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 your

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 7

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] Capturing the message that killed an actor

2015-10-19 Thread Viktor Klang
Hi Arne, sounds like spawning a child-actor for each operation would give you both control over failures (supervision) as well as knowing what message was delegated to what actor. On Sat, Oct 17, 2015 at 6:09 PM, Arne Claassen wrote: > Viktor, > > Yeah, i can see a crash loop being undesirable,

[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 Oko

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] 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 nothing… > RxJava doesn't

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 questio

[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 i

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. Oktober 2015 17:29:09 UTC+2

[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 stat

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] 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 Bra

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: 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 an

[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 insid

[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 nothin

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 using Akka 2.3.13

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 and restart the > shard

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

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: > http://letitcrash.com/post/5595881

[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 initializatio

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 [akka.tcp://DataDistributionEndToEndTest@dist-index:2720/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FDataDistributionEndToEndTest%40dist-index%3A2721-0

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 during my actor's > con

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 UTC

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 create the actor, is

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], subsys

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 with another non-act

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

2015-10-19 Thread Eduardo Fernandes
Ok. I'l work on that. Thanks. El lunes, 19 de octubre de 2015, 14:39:46 (UTC+2), Patrik Nordwall escribió: > > 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

Re: [akka-user] Modeling synchronous startup behavior

2015-10-19 Thread Rich Henry
All the other components are thread-safe. I just need an order of operations including the actorOf call, so coming full circle, my original plan was to use some kind of initialization message with the ask pattern to sync it up. I was trying to figure out if this is the best i can do. On Mon

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 wai

Re: [akka-user] Capturing the message that killed an actor

2015-10-19 Thread Виктор Лобанов
Hi Viktor and Arne. Sorry for intrusion, but I have some thoughts about similar problem. Recently I had similar design problem and came up with actor-per-request solution by myself. I even spawn whole subtree of actors per request, where supervisor captured initial sender (e.g. client) for furt

[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 kil

Re: [akka-user] Shared cluster shard allocation strategy

2015-10-19 Thread vikas
Hi Patrik, Would you be able to provide more info on how to do co-location with consistent hashing? That would be very helpful! Thanks, Vikas On Saturday, November 22, 2014 at 8:08:04 AM UTC-8, Patrik Nordwall wrote: > > Hi Moritz, > > On Wed, Nov 19, 2014 at 3:27 PM, Moritz Schallaböck < > mor

[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 Acto

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

2015-10-19 Thread Adam Dohnal
You understand it right. Unfortunately, your solution won't work. Suppose player has 30/100 health (current/max) and 99/100 experience and two messages are sent to him with this order: AddExperience(10) TakeDamage(40) Correct behaviour is that first 10 xp is added to 109/100 ... level is earne