Re: [akka-user] How to pass a Spring security context to all actors in a Akka system?

2016-03-19 Thread Bernd Götz
Thanks, sounds interesting, I'll have a closer look at it. 2016-03-17 22:03 GMT+01:00 Carlos Dañel Ferreyra : > I believe the tracing module > of Kamon can help you here. > After authentication you should

Re: [akka-user] How to pass a Spring security context to all actors in a Akka system?

2016-03-19 Thread Bernd G.
Thanks, sounds interesting, I'll have a closer look at it. On Friday, 18 March 2016 00:13:51 UTC+1, Carlos Dañel Ferreyra wrote: > > I believe the tracing module > of Kamon can help you here. > After authentication you should

Re: [akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Guido Medina
How long is enough time? I tried sleep 1 sec between leave and terminate calls and it didn't work. On Friday, March 18, 2016 at 5:13:50 PM UTC, Konrad Malawski wrote: > > Also, please don't do that: >cluster.leave(cluster.selfAddress()); > system.terminate(); > It is wrong. > >

Re: [akka-user] Akka remote communication roadmap?

2016-03-19 Thread Guido Medina
Hi Patrik, Good morning news, I think a light framework like Aeron will be most welcome, UDP shouldn't be a problem as long as (as you mentioned) reliable delivery can be implemented/configured on top. About Netty 3 I don't understand what you are saying, akka-remote is already based on Netty

Re: [akka-user] Re: Scheduling long term processes in cluster

2016-03-19 Thread Guido Medina
Think of the following: node_a (tasks issuer) node_[1..N]/taskCreator (1 task creator per node) router <- round robin router -> list -> [node_1/taskCreator, ..., node_N/taskCreator] new task -> router.tell(task, sender) each task creator creates an actor for a received task and each of this

Re: [akka-user] Re: Scheduling long term processes in cluster

2016-03-19 Thread Filippo De Luca
Thanks Guido, I had in mind something very similar. A alternative solution I am thinking of, because I don't want more than one process running at the same time on the same node, is using a cluster aware router with one routee per node. When some actor send something like: StartProces(...) the

Re: [akka-user] Akka Cluster without Remoting?

2016-03-19 Thread Endre Varga
Hi Curt, On Fri, Mar 18, 2016 at 5:35 AM, Curt Siffert wrote: > Hi, I'm supporting a pre-existing Akka project that is currently set up to > run 1 Master instance and N Worker instances. > > It does not use routing/remoting. > What do you mean by not using routing? How does

Re: [akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-19 Thread Guido Medina
Give me cookies first, oreos !!! I'm sure I will, it is just a matter of time and spend sometime migrating, I just initially didn't have the time to be the first with headaches, That said I think in a couple of weeks I should be moved over. Thanks to Akka team and contributors for all the effort

[akka-user] Re: Dedicated seed nodes for akka cluster

2016-03-19 Thread Rafał Krzewski
There are ways to boot up Akka cluster without dedicated seed node: whichever node comes up first becomes the seed of the cluster and lets in the other nodes. An external KV is used to perform the initial coordination. Take a look at: https://github.com/hseeberger/constructr and

[akka-user] Problems connecting a remote node using the sample cluster project

2016-03-19 Thread Scott Mackie
Hi folks, I've been taking a look at the clustering sample project provided with the Typesafe Activator , and I'm having some trouble with joining a remotely running cluster. I've got the project set up on two machines,

[akka-user] Re: Scheduling long term processes in cluster

2016-03-19 Thread Guido Medina
Hi Filippo, One idea (of many I guess): 1. Have a dispatcher for long running futures. 2. For each task create an actor and within that actor create a future that each time such task status changes it sends a message to its actor. 3. Query such actor to get statuses. The reason

[akka-user] Re: Problems connecting a remote node using the sample cluster project

2016-03-19 Thread Scott Mackie
I think I may have realised one part of my mistake, the "akka.remote.netty.tcp.hostname" needs to be set to the hostname of the machine that the application is running on, so that the remote nodes can talk back to it. Now that I've changed that, I'm successfully starting up the application,

Re: [akka-user] Problems connecting a remote node using the sample cluster project

2016-03-19 Thread Heiko Seeberger
You need to start one node with akka.remote.netty.tcp.port=2551 (the first seed node) at least, e.g. via a JVM argument. Read up the details in the Cluster docs. Heiko -- Heiko Seeberger Home: heikoseeberger.de Twitter: @hseeberger

[akka-user] Re: Dedicated seed nodes for akka cluster

2016-03-19 Thread 'Christian Hoffmeister' via Akka User List
So basically the known seed nodes are replaces with a known etcd cluster for the information sharing, if I understand this right? Somewhat like this? * A joins, no one is there, so it puts inself into etcd and starts a single node cluster * B joins, finds A in etcd and joins A * C joins, finds

Re: [akka-user] Akka game state

2016-03-19 Thread Владимир Морозов
Thank you, I dig in it :) пятница, 18 марта 2016 г., 20:17:57 UTC+3 пользователь Konrad Malawski написал: > > > On Sun, Mar 13, 2016 at 7:12 PM, Владимир Морозов > wrote: > >> If two Player's actors live in two different remote actor systems - how >> safely transfer item

[akka-user] Reader Writer Lock using Actor Model in Akka

2016-03-19 Thread neel choudhury
I want to implement the famous reader writer model using actor model. We can have multiple reader reading but only one writer can write. Also when a writer writes no reader can read and vice versa. To solve this problem i thought of using a superviser actor which maintains a set for reader

Re: [akka-user] Akka remote communication roadmap?

2016-03-19 Thread Endre Varga
Nope. We just drop out-of-order messages. There will be no reliable delivery (except system messages). But even if we need to add it, it is not hard to implement. -Endre On Fri, Mar 18, 2016 at 11:21 AM, Guido Medina wrote: > Message ordering would be challenging to

[akka-user] Re: Akka Actor Hierarchy Question

2016-03-19 Thread nkasvosve
@Tal Ecxellent answer On Tuesday, 15 March 2016 07:35:10 UTC, Tal Pressman wrote: > > Hi, > > Basically it boils down to which actors should supervise others - if you > want to have a single actor responsible for supervising all the chat rooms > that's fine. Note that this *doesn't* mean that

Re: [akka-user] Akka remote communication roadmap?

2016-03-19 Thread Patrik Nordwall
Hi all, A quick update of the roadmap for Akka Remoting. Lightbend's core Akka team will be able to start working on a new implementation for Akka Remoting next sprint, which starts April 4. We will then start with describing the goals and overall design ideas and share with you. We are

Re: [akka-user] Akka remote communication roadmap?

2016-03-19 Thread Patrik Nordwall
On Fri, Mar 18, 2016 at 11:14 AM, Guido Medina wrote: > Hi Patrik, > > Good morning news, I think a light framework like Aeron will be most > welcome, UDP shouldn't be a problem as long as (as you mentioned) reliable > delivery can be implemented/configured on top. > About

[akka-user] Dedicated seed nodes for akka cluster

2016-03-19 Thread 'Christian Hoffmeister' via Akka User List
Hello, I am just starting to dive into akka-cluster and have a question regarding the seed nodes: My test project consists of 4 projects so far: * PROTOCOL contains messaging case classes * API contains cluster node, that also exposes a rest api (akka-cluster + akka-http) * AUTH contains

[akka-user] Akka Cluster without Remoting?

2016-03-19 Thread Curt Siffert
Hi, I'm supporting a pre-existing Akka project that is currently set up to run 1 Master instance and N Worker instances. It does not use routing/remoting. We start them in 'Master' or 'Worker' modes via startup flags - each instance has its own actor system, and the only information they

[akka-user] Akka-camel alternatives

2016-03-19 Thread Jay Hutfles
Hi, I've just discovered Apache Camel for enterprise integration patterns, and Akka's support through akka-camel. At first I was disappointed in myself for not knowing about it sooner. But there isn't much discussion around it. I know this may be subjective, but is Camel still a best

Re: [akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Konrad Malawski
Also, please don't do that: cluster.leave(cluster.selfAddress()); system.terminate(); It is wrong. You need to give the cluster gossip enough time to complete the leaving "nicely". Proper graceful shutdown means you need to wait for _your own_ address to come back as MemberRemoved

[akka-user] Re: Akka remote small/many messages throughput discussion?

2016-03-19 Thread Guido Medina
To clarify further, I suspect the following: - With the current akka-remote no design have advantage over the other in as long as your are sending from same node1 to node 2. - With the future akka-remote different threads will be broadcasting my messages depending on the

[akka-user] Re: Reader Writer Lock using Actor Model in Akka

2016-03-19 Thread Stephen McDonald
On Friday, 18 March 2016 08:59:14 UTC+11, Rafał Krzewski wrote: > > Are you sure you are approaching the problem from the best angle? Akka > gives you a guarantee that the execution of actor code is single threaded, > so each time a message is processed, the code has an "exclusive lock" on >

Re: [akka-user] Akka Streams xcustom balance junction using Akka Streams graphstage is not working as intended

2016-03-19 Thread Konrad Malawski
What you're trying to build here is pretty similar to "Balance", so readint it's source may help you out: https://github.com/akka/akka/blob/master/akka-stream/src/main/scala/akka/stream/scaladsl/Graph.scala#L596 Also please note that the current impl: - will eventually blow up with double-push or

Re: [akka-user] Re: Intercept STDOUT of other process

2016-03-19 Thread Konrad Malawski
That's what bash pipes are for :-) --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 19 March 2016 at 15:51:10, Arun Sethia (sethia.a...@gmail.com) wrote: Thanks. My question is more on STDOUT of any other process, specially if it is non java. On Saturday, March 19, 2016 at 6:54:51 AM

[akka-user] Re: Intercept STDOUT of other process

2016-03-19 Thread Arun Sethia
Thanks. My question is more on STDOUT of any other process, specially if it is non java. On Saturday, March 19, 2016 at 6:54:51 AM UTC-5, Konrad Malawski wrote: > > Hi there, > > Please don't *immediately* cross post your questions here and stack > overflow >

Re: [akka-user] How to pass a Spring security context to all actors in a Akka system?

2016-03-19 Thread Konrad Malawski
Having that said, we do have such mechanisms in place – that act "like a thread local, but across actors", metadata can be transferred along with messages transparently using our Lightbend Monitoring infrastructure: Here's an example which does so with MDC data, but it could do the same for

[akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Guido Medina
Hi Benjamin, I also rely on cluster events and AFAIK you can expect (and trust) *MemberUp* and *MemberRemoved*, these IMHO are the only two consistent states you can trust. In other words, I register some actors only when their nodes reach *MemberUp* and unregister only when their nodes reach

Re: [akka-user] Akka remote small/many messages throughput discussion?

2016-03-19 Thread Endre Varga
On Fri, Mar 18, 2016 at 12:31 PM, Guido Medina wrote: > Thanks for the quick response: > > Nodes pair or actors pair? > Sorry I meant actors pair. But honestly, in the case of UDP there will be no performance increase by having these subchannels at all, at least in terms of

Re: [akka-user] Restart does not work with my zipper? What am I doing wrong?

2016-03-19 Thread john . vieten
hi roland, thanx that helps alot! And great that you still follow the list. Mang Greetings John -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the archives:

Re: [akka-user] Akka remote communication roadmap?

2016-03-19 Thread Filippo De Luca
Hi Patrick, what is the advantage of the UPD over TCP if we have to develop the order and delivery reliability on top of that? The only scenario I see is the multicast, is it needed for akka-remoting? Cheers On 18 March 2016 at 09:46, Patrik Nordwall wrote: > Hi

Re: [akka-user] Akka remote small/many messages throughput discussion?

2016-03-19 Thread Endre Varga
On Fri, Mar 18, 2016 at 12:13 PM, Guido Medina wrote: > Given the following scenario, which design would fit best: > > Assume I have 2 receivers@node-1, for simplicity lets call them (I know > I'm using the wrong convention): > >- receiver-1@node-1 >- receiver-2@node-1

Re: [akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Patrik Nordwall
Hi Ben There are some subtle exceptions to the convergence rule. Unreachable members with status Down or Exiting are not counted. /Patrik On Thu, Mar 17, 2016 at 11:25 PM, Guido Medina wrote: > In fact in the other nodes you get the following: > > INFO 22:10:20,383 ster) -

[akka-user] What is the impact of Kafka Streams on reactive-kafka?

2016-03-19 Thread 'Axel Poigné' via Akka User List
Seems to me that Kafka streams support distribution but not back pressure, reactive-kafka vice versa. Anyway, using Kafka streams seems to be very lightweight when using Kafka. Any comments? -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >>

[akka-user] Akka HTTP POST accepted media types

2016-03-19 Thread Christian Pérez-Llamas
Hi, I am doing my first steps with Akka HTTP with no previous experience with Spray. I need to implement a POST that can accept either *text/plain* or *application/json* and returns *application/json*. I am using akka-http-json library for

Re: [akka-user] Akka remote communication roadmap?

2016-03-19 Thread Guido Medina
@Filippo, I haven't watched it but it looks interesting: http://www.infoq.com/presentations/aeron-messaging Cheers, Guido. On Friday, March 18, 2016 at 10:09:06 AM UTC, Filippo De Luca wrote: > > Hi Patrick, what is the advantage of the UPD over TCP if we have to > develop the order and

[akka-user] Apparent thread leak with non-default akka dispatcher

2016-03-19 Thread Jesse C
I've got an application that is using akka and I'm seeing some really strange behavior. I'm assuming this is something dumb that I'm doing in my configuration. The setup is CentOS 6.7 Java 1.8.0_71-b15 Scala 2.11.7 Akka 2.4.2 Here is what I'm seeing. First noticed the issue because the

[akka-user] Re: Intercept STDOUT of other process

2016-03-19 Thread Konrad Malawski
Hi there, Please don't *immediately* cross post your questions here and stack overflow , it makes it harder to track answered questions. It's ok to cross post if after a while you did not

[akka-user] Re: Reader Writer Lock using Actor Model in Akka

2016-03-19 Thread Guido Medina
Trying to emulate a read/write lock with actors can be very difficult, maybe agents can do? http://doc.akka.io/docs/akka/snapshot/java/agents.html HTH, Guido. On Thursday, March 17, 2016 at 3:52:47 PM UTC, neel choudhury wrote: > > I want to implement the famous reader writer model using

Re: [akka-user] Re: CORS Support Akka-http

2016-03-19 Thread Lomig Mégard
Hi, Jumping in this thread to share the akka-http CORS implementation I have been working on recently: https://github.com/lomigmegard/akka-http-cors The goal was to follow the recommendation from W3C (https://www.w3.org/TR/cors/) and be still easy to use. Not production ready as I would

Re: [akka-user] akka.stream.scaladsl.One2OneBidiFlow$OutputTruncationException$: null exception

2016-03-19 Thread Konrad Malawski
This will be addressed by: https://github.com/akka/akka/issues/19777 Also, please upgrade to Akka 2.4.2, here's the migration guide: http://doc.akka.io/docs/akka/2.4.2/scala/stream/migration-guide-2.0-2.4-scala.html :-) Lots of things have been fixed in 2.4. -- ktoso On Thu, Mar 17, 2016 at

Re: [akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Guido Medina
Won't happen, the micro-services are being sent Linux SIGTERM, which is why I'm hooking on the JVM shutdown. On Friday, March 18, 2016 at 5:26:01 PM UTC, Konrad Malawski wrote: > > I precisely explained for what event you need to wait :-) > > Proper graceful shutdown means you need to wait for

[akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Benjamin Black
Hi Guido, I think in your case you are shutting down before the node has communicated to the leader that it wants to leave. I wait to get the MemberExited message before shutting down the node. Maybe I should wait for the MemberRemoved? Either way the ultimate aim is to not have the

[akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Guido Medina
I just tried this: final Cluster cluster = Cluster.get(system); cluster.leave(cluster.selfAddress()); try { Thread.sleep(1000); } catch (InterruptedException ignored) { } system.terminate(); and it didn't work, still the dead node has to timeout in the others, in other words I don't see any

[akka-user] Re: Restart does not work with my zipper? What am I doing wrong?

2016-03-19 Thread john . vieten
I tried inserting a buffer but ist still doesn't work. Any other ideas? Am Donnerstag, 17. März 2016 18:58:33 UTC+1 schrieb john@gmail.com: > > I guess that I am suffering from deadlock? this post semms to apply to my > problem >

[akka-user] Clarification on unreachable nodes in cluster

2016-03-19 Thread Benjamin Black
Hello, I'm adding logic to our service so that when a node is being restarted it gracefully leaves the cluster using cluster.leave(cluster.selfAddress). In the cluster specification doc it states: If a node is unreachable then gossip convergence is not possible and therefore any leader

[akka-user] Restart does not work with my zipper? What am I doing wrong?

2016-03-19 Thread john . vieten
Hi, I am using SupervisionStrategy restart. If I add a Zipper to the graph "restart" doesn't work. What am I doing wrong? The code is here: http://pastebin.com/8L6LBZ5R I am just throwing a Exception on the count of 2. I would expect that "continue doing work" gets printed to system.out 4

Re: [akka-user] Akka HTTP POST accepted media types

2016-03-19 Thread Konrad Malawski
Ah yes :-) Agreed and that's because of what I hinted at "things can be improved, will follow up" in the first email :-) Effectively the response you want is indeed produced by Akka, however only when content negotiation is left up to Akka, whereas you basically did it manually (i.e. if doesnt

[akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Guido Medina
In fact in the other nodes you get the following: INFO 22:10:20,383 ster) - Cluster Node [akka.tcp://DevCluster@127.0.0.1:2552] - Leader is moving node [akka.tcp://DevCluster@127.0.0.1:38845] to [Exiting] INFO 22:10:20,384 orRef - Message [akka.cluster.GossipEnvelope] from Actor[

Re: [akka-user] Akka remote communication roadmap?

2016-03-19 Thread Patrik Nordwall
On Fri, Mar 18, 2016 at 11:09 AM, Filippo De Luca wrote: > Hi Patrick, what is the advantage of the UPD over TCP if we have to > develop the order and delivery reliability on top of that? > There are probably several performance reasons, but also the connection lifecycle

Re: [akka-user] Restart does not work with my zipper? What am I doing wrong?

2016-03-19 Thread Roland Kuhn
Hi John, in your setup the two flows between the broadcast and the zip must always be perfectly balanced, if one of them may lose elements then eventually the whole graph will get stuck. Either you make sure that failure does not happen (and when it does you don’t restart but kill the whole

Re: [akka-user] How to pass a Spring security context to all actors in a Akka system?

2016-03-19 Thread Carlos Dañel Ferreyra
I believe the tracing module of Kamon can help you here. After authentication you should dispatch the first message within a new tracer context, Kamon will ensure that context is propagated to all actors involved. El jueves, 17

Re: [akka-user] Re: Talking to Akka Actors from non Java/Scala languages

2016-03-19 Thread Konrad Malawski
Hi there, AFAIR it's not that hard to just use the raw 0MQ APIs and bridge into Actors when you need to. On Tue, Mar 15, 2016 at 3:13 PM, Brandon Barker wrote: > Maybe I shouldn't be digging up an old discussion, but I'm curious what > 0MQ interface people are now

Re: [akka-user] How to pass a Spring security context to all actors in a Akka system?

2016-03-19 Thread Bernd G.
Hi Konrad, thanks for the heads up. Good point, I will also ask around in the Spring community. It can be looked at, however, as a general question of security in a Akka system - how can I pass user identity information into a Akka system so that it can be picked up by any Actor receiving

Re: [akka-user] Akka HTTP POST accepted media types

2016-03-19 Thread Christian Pérez-Llamas
Hi, sorry, I was asking too many things and not being clear. I am doing a curl with an intentionally unsupported content-type to see the response in those cases. I was expecting something more specific such as: HTTP/1.1 415 Unsupported Media Type The request's Content-Type is not supported.

Re: [akka-user] How to pass a Spring security context to all actors in a Akka system?

2016-03-19 Thread Bernd Götz
Hi Ryan, many thanks, your proposal makes sense to me, and I think I will take that approach. On the other hand, I don't really like the idea to have the user id passed along as a member of my messages, like I don't think we should pass around the user id as method parameters in the non-Akka

Re: [akka-user] How to stop an Actor using akka-http's actor-per-request example without getting an Abrupt Termination?

2016-03-19 Thread Konrad Malawski
Yeah, thanks Samuel for linking to the issue. Interested parties please watch that issue and PR :) On Tue, Mar 15, 2016 at 9:51 AM, Samuel Tardieu wrote: > I think this is a bug: https://github.com/akka/akka/issues/20032 > > > Le mar. 15 mars 2016 à 03:57, Sam Smoot

[akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Guido Medina
As for cluster.leave(cluster.selfAddress) my micro-services use the following to leave: Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { final Cluster cluster = Cluster.get(system); cluster.leave(cluster.selfAddress());

[akka-user] Akka remote small/many messages throughput discussion?

2016-03-19 Thread Guido Medina
Given the following scenario, which design would fit best: Assume I have 2 receivers@node-1, for simplicity lets call them (I know I'm using the wrong convention): - receiver-1@node-1 - receiver-2@node-1 Assume I have 4 processors@node-2, for simplicity again lets call them: -

Re: [akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Konrad Malawski
I precisely explained for what event you need to wait :-) Proper graceful shutdown means you need to wait for _your own_ address to come back as MemberRemoved event, and THEN you can shut down the actor system and JVM. --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 18 March 2016 at

[akka-user] akka.stream.scaladsl.One2OneBidiFlow$OutputTruncationException$: null exception

2016-03-19 Thread john . vieten
I am getting occasional the above exception. Unfortunately without a stackstrace. It is also difficult for me to reproduce the problem so I am just fishing for ideas or hints? The error happens when processing a stream with a Flow using Http.get( actorSystem).superPool(materializer); I am

Re: [akka-user] Re: ${spray.version} not find

2016-03-19 Thread Konrad Malawski
I don't know about Spray to be honest actually. In Akka we certainly include the akka.version in config. --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 15 March 2016 at 18:59:52, abhishek jain (aa.jai...@gmail.com) wrote: I am using sbt assembly to generate a fat jar file... On

[akka-user] Scheduling long term processes in cluster

2016-03-19 Thread Filippo De Luca
Hi Guys, I have a task to schedule a long term task on the cluster. I am thinking to model this task as an Actor that got deployed remotely. What is the best approach to do that? I want to have a way to control the amount of concurrent process I run in the cluster. Also the Actor that run