Re: [akka-user] Why is aroundReceive protected[akka]?

2015-10-19 Thread Patrik Nordwall
There is also the Receive Pipeline http://doc.akka.io/docs/akka/2.4.0/contrib/receive-pipeline.html /Patrik mån 19 okt. 2015 kl. 00:33 skrev Konrad Malawski < konrad.malaw...@typesafe.com>: > Hi Jan! > > Yes, it's definitely one of those > > "Do not do this because you will most likely shoot

Re: [akka-user] Re: Behavior of Akka when you sleep in an actor

2015-10-19 Thread Adam
I don't understand the purpose of "keeping the actor busy". Why not use the actor system's scheduler in order to implement the delay? Do you actually want to use CPU or other resources? The only thing to pay attention to is that the scheduler, has a certain precision, so the delay may turn out

Re: [akka-user] Re: [akka-stream] How to get materialization result in partial flow

2015-10-19 Thread Viktor Klang
Hi Alexey, I don't have any suggestion for a fix, but it does seem like your setup is a bit too entangled. If you take a step back and look at the lifecycle and propagation pattern needed by your solution, is it workable or does it make sense to consider other solutions? On Mon, Oct 19, 2015 at

[akka-user] Re: Dynamic dependency Injection in AKKA

2015-10-19 Thread Richard Bradley
You can use any JVM dependency injection framework you prefer, such as Guice. I think that DI is less fashionable amongst Akka users as it is amongst "enterprise Java". I rarely see DI in Akka examples or Akka codebases. HTH Rich On Friday, October 16, 2015 at 11:05:40 AM UTC+1, Maatary

Re: [akka-user] Abridged summary of akka-user@googlegroups.com - 10 updates in 5 topics

2015-10-19 Thread Viktor Klang
Hi Joseph, please respond on the same thread to keep continuity. For the Servlet communicating with the actor, I'd propose to use Inbox: http://doc.akka.io/docs/akka/2.3.14/java/untyped-actors.html#The_Inbox On Mon, Oct 19, 2015 at 3:49 AM, Joseph Mansigian < aed.project.c...@gmail.com> wrote:

Re: [akka-user] Re: Proposed major simplification of the Akka Streams FlowGraph APIs

2015-10-19 Thread אדם חונן
"Makes sense, but once you do—is it a no-go or is there a means of doing it?" Well, RxJava implements reactive streams, so obviously it's possible to do the same things. For example: For Broadcast, I'd use PublishSubject. For Balance, I'd create an Observable, that holds multiple subscriptions

[akka-user] Idle connection handling for non-pooled http connections

2015-10-19 Thread Chris Baxter
Referencing this ticket , I can see that the idle connection/timeout handling is not yet in place when using pooled connections. I added a comment around the behavior of non-pooled outbound connections with timeouts hoping to get a response but

Re: [akka-user] AllocationStrategy rebalance() is stopping actors outside resharding list

2015-10-19 Thread Patrik Nordwall
Hi Eduardo, That sounds strange. I'm not aware of any know bug here, but that doesn't mean that it is bug free. Could you setup a testcase/example that we can use to reproduce the issue? Thanks, Patrik On Mon, Oct 19, 2015 at 1:03 PM, Eduardo Fernandes wrote: > Hi. > > We're

[akka-user] AllocationStrategy rebalance() is stopping actors outside resharding list

2015-10-19 Thread Eduardo Fernandes
Hi. We're using Akka 2.3.13 (Java Interface). We have our own AllocationStrategy implementation and the idea is move several shards from one node to other. We have a 2 nodes in the cluster and 1000 shards in total. When we start 7000 actors we have approximately 3500 actors on each node

Re: [akka-user] Cluster sharding shutdown and restart in proxy mode

2015-10-19 Thread Patrik Nordwall
On Tue, Oct 13, 2015 at 2:04 PM, Johannes Berg wrote: > Hi! > > I'm running cluster sharding and at a certain point I want to instruct one > of the nodes to shutdown a certain shardregion and handoff all the shards > to other nodes. But I still want to keep the node around

Re: [akka-user] Event-sourcing with aka-persistence

2015-10-19 Thread Patrik Nordwall
If I understand it correctly your question is about how to persist the LevelEarned event which comes via the asyncrounous player.observable.subscribe callback. Since this is an actor you must turn that callback into a message that is sent to self and when receiving that message you can persist it.

Re: [akka-user] Re: Proposed major simplification of the Akka Streams FlowGraph APIs

2015-10-19 Thread Viktor Klang
On Sun, Oct 18, 2015 at 5:57 PM, אדם חונן wrote: > Ah.. I didn't think of that type erasure issue. Makes sense. > > Yeah, that one is somewhat of a silent killer. Everything works until you suddenly need both Graph[SourceShape] and Graph[FlowShape] and now it's all for

[akka-user] How to survive recovery failure?

2015-10-19 Thread Brice Figureau
Hi, I've encountered an issue where due to a timeout in Cassandra, some of my persistent actors couldn't recover and were forcibly stopped. I would have liked to retry one more time for instance, or keep the actor running (because the actor could still serve even though without the recovered

Re: [akka-user] Re: Websockets with Elasticsearch ScrollPublisher - Requesting more elements

2015-10-19 Thread Patrik Nordwall
Cool, thanks for sharing! /Patrik On Sun, Oct 11, 2015 at 5:14 PM, Muki wrote: > Hi, > > I implemented a working solution and will soon provide it as an activator > template. > > https://github.com/muuki88/akka-http-elasticsearch > > cheers, > Muki > > Am Freitag, 2.

Re: [akka-user] Re: Proposed major simplification of the Akka Streams FlowGraph APIs

2015-10-19 Thread Konrad Malawski
My main beef with the scaladsl for FlowGraph.Builder is that it both requires the builder to be implicit (as in { implicit builder => }) but also requires import FlowGraph.Implicits._, both of which are hard to discover if all you do is to work with the code (and not reading docs). The

[akka-user] difference between dispatcher and route?

2015-10-19 Thread 张留成
Hi All: What's the difference between dispatcher and route? when should i use dispatcher and when to use route? see the above image,if want to send a signal when all complete, show i use

Re: [akka-user] address is now gated for [5000] ms

2015-10-19 Thread Patrik Nordwall
That is probably config property akka.remote.retry-gate-closed-for /Patrik On Wed, Oct 7, 2015 at 6:25 PM, Kostas kougios < kostas.koug...@googlemail.com> wrote: > Hi, I am occasionally getting this when running tests. The test resumes, > but I wait for 5 secs. Is there a config property to set

Re: [akka-user] Re: Dynamic dependency Injection in AKKA

2015-10-19 Thread Viktor Klang
Let me be clear: We have no beef with enterprise Java :) As for Dependency Injection with Akka, this blog post should be informative: http://letitcrash.com/post/55958814293/akka-dependency-injection On Mon, Oct 19, 2015 at 10:13 AM, Richard Bradley < richard.bradley.softw...@gmail.com> wrote: >

Re: [akka-user] Issues in AKKA persistence w/ KAFKA

2015-10-19 Thread Patrik Nordwall
In 2.4.0 there is a new utility to remove the internal cluster sharding data http://doc.akka.io/docs/akka/2.4.0/scala/cluster-sharding.html#Removal_of_Internal_Cluster_Sharding_Data . The most common reason for problem a is using auto-down and I highly recommend that you use the Typesafe Split

Re: [akka-user] SharedLeveldbJournal questions

2015-10-19 Thread Patrik Nordwall
SharedLeveldbJournal.setStore must be done once, when the actor system is started. I agree that this can probably be simplified. We have that initialization code in several of the activator templates (e.g. Akka Cluster Sharding with Scala

Re: [akka-user] Re: Dynamic dependency Injection in AKKA

2015-10-19 Thread Maatary Okouya
I Use MACWire by the way. Gives more flexibility i think. On Monday, October 19, 2015 at 4:27:32 AM UTC-4, √ wrote: > > Let me be clear: We have no beef with enterprise Java :) > > As for Dependency Injection with Akka, this blog post should be > informative: >

Re: [akka-user] address is now gated for [5000] ms

2015-10-19 Thread 'Konstantinos Kougios' via Akka User List
Thanks Patrik, I tried it and it changes the gate wait, but has no effect in the overall wait : 2015-10-19 14:25:25,524 WARN

Re: [akka-user] Modeling synchronous startup behavior

2015-10-19 Thread Rich Henry
I guess that's the why of question 2. Im not clear when the different lifecycle phases, like preStart, occur. I would assume preStart occurs after object construction, and is asynchronous to the system call used to create the actor, is that not so? On Monday, October 19, 2015 at 9:40:44 AM

Re: [akka-user] Modeling synchronous startup behavior

2015-10-19 Thread Viktor Klang
Hi Rich, and why can't it be executed in preStart()? On Mon, Oct 19, 2015 at 3:20 PM, Rich Henry wrote: > I had seen a previous post that didn't really seem to come to any definite > conclusion about this subject. > > I have some synchronous behavior I need to accomplish

Re: [akka-user] Re: Dynamic dependency Injection in AKKA

2015-10-19 Thread Maatary Okouya
Very informative indeed. But it contains not so many alternative when it comes to my specific issue. The bean should not expose the ActorSystem directly to consumers of its service. Instead it is recommended to offer ActorRefs to components within the ActorSystem to clients; these can be

[akka-user] Modeling synchronous startup behavior

2015-10-19 Thread Rich Henry
I had seen a previous post that didn't really seem to come to any definite conclusion about this subject. I have some synchronous behavior I need to accomplish during my actor's construction, but the constructor is called asynchronously. 1) Is the accepted way to do this to use an

Re: [akka-user] Modeling synchronous startup behavior

2015-10-19 Thread Viktor Klang
On Mon, Oct 19, 2015 at 4:11 PM, Rich Henry wrote: > I guess that's the why of question 2. Im not clear when the different > lifecycle phases, like preStart, occur. > > I would assume preStart occurs after object construction, and is > asynchronous to the system call used to

Re: [akka-user] Modeling synchronous startup behavior

2015-10-19 Thread Viktor Klang
Hi Rich, On Mon, Oct 19, 2015 at 4:50 PM, Rich Henry wrote: > I would if it told me when that chain of events starts and stops relative > to the actorOf call itself. > actorOf is asynchronous so that's completely separate from the lifecycle. > > My actor needs to register

Re: [akka-user] Modeling synchronous startup behavior

2015-10-19 Thread Rich Henry
I would if it told me when that chain of events starts and stops relative to the actorOf call itself. My actor needs to register with another non-actor subsystem before i interact with it, so If i write code like... val subsys = new SubSys() val a = system.actorOf(Props(classOf[MyActor],

Re: [akka-user] address is now gated for [5000] ms

2015-10-19 Thread Patrik Nordwall
I'm afraid I don't know why you get the "association failure" in the first place or if it is related to the 10 sec delay. /Patrik On Mon, Oct 19, 2015 at 3:28 PM, 'Konstantinos Kougios' via Akka User List < akka-user@googlegroups.com> wrote: > Thanks Patrik, I tried it and it changes the gate

[akka-user] Cluster Sharding

2015-10-19 Thread vikas
In our architecture, we have API servers communicating to an Actor Cluster. This leads to a few questions: 1. Is there a way to make entityProps dynamic? In the examples here , it seems that the Props are the same for every

[akka-user] Re: How to synchronize/notify multiple parallel Actors on completion?

2015-10-19 Thread Sean Zhong
> > I'd be interested to know if there are other examples which might solve > this problem without explicitly maintaining state? @Denis You can create a only-use-once temporary actor in the router to track all acking. After it receive all acking from workers, send a message to router, and