Re: [akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-20 Thread Patrik Nordwall
On Fri, Nov 20, 2015 at 8:46 AM, Jim Hazen wrote: > > > On Thursday, November 19, 2015 at 12:32:38 PM UTC-8, Patrik Nordwall wrote: >> >> >> >> On Thu, Nov 19, 2015 at 8:06 PM, Jim Hazen wrote: >> >>> Wait, what? So cluster sharding depends on shared mutable state across >>> your cluster to wor

Re: [akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-19 Thread Jim Hazen
On Thursday, November 19, 2015 at 12:32:38 PM UTC-8, Patrik Nordwall wrote: > > > > On Thu, Nov 19, 2015 at 8:06 PM, Jim Hazen > wrote: > >> Wait, what? So cluster sharding depends on shared mutable state across >> your cluster to work? AFAIknew the independent local nodes managed their >> s

Re: [akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-19 Thread Patrik Nordwall
On Thu, Nov 19, 2015 at 8:06 PM, Jim Hazen wrote: > Wait, what? So cluster sharding depends on shared mutable state across > your cluster to work? AFAIknew the independent local nodes managed their > state internally, communicated/coordinated via network protocolling and > delegated to a master

Re: [akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-19 Thread Jim Hazen
Wait, what? So cluster sharding depends on shared mutable state across your cluster to work? AFAIknew the independent local nodes managed their state internally, communicated/coordinated via network protocolling and delegated to a master when it needed to determine a shard owner the first tim

Re: [akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-18 Thread Patrik Nordwall
Leveldb can't be used for cluster sharding, since that is a local journal. The documentation of persistence has links to distributed journals. An alternative is to use the ddata mode for cluster sharding, then Distributed Data will be used instead of Persistence for the internal state of Cluster S

[akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-18 Thread Jim Hazen
You don't need your clustered actors to be persistence aware. So you are absolutely free to have sharded stateless actors, or manage state in some other way. The confusing part is that the cluster sharding internals requires akka persistence to be configured for at least one journal. The inter

[akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-17 Thread Johan Andrén
Yes, that is just one very nice use case, you can shard regular actors. On Tuesday, November 17, 2015 at 4:19:58 PM UTC+1, Danny Lesnik wrote: > > Hi, > > Thank you for your response, as far as I know cluster sharding works only > with a persistent actors and now we don't want to persistent acto

[akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-17 Thread Danny Lesnik
Hi, Thank you for your response, as far as I know cluster sharding works only with a persistent actors and now we don't want to persistent actors because our actors are stateless. Can it work with Actor instead of Persistent Actor? Danny. On Tuesday, November 17, 2015 at 11:28:08 AM UTC+2,

[akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-17 Thread Johan Andrén
You could read up on sharding and see if that is what you're after, I think it could be since you are basically describing that you would have one worker per id rather than distributing messages for M ids over N actors: http://doc.akka.io/docs/akka/2.4.0/scala/cluster-sharding.html On Tuesday,

[akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-17 Thread Danny Lesnik
Thank you for the response. it looks much better, but now I see that all my three "statsWorker" actors created on the node initiation. Is there any option to start "statsWorker" actors dynamically, for example if I'm sending messages with id range between [1..10] i will have 10 distributed "s

[akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-17 Thread Johan Andrén
Hi Danny, context.actorOf(Props[StatsWorker],"statsWorker") creates a local child actor, to make it a pool from configuration you need to use either context .actorOf(FromConfig.props(Props[StatsWorker]),"statsWorker") or programmatically configure the pool. See the docs for more details: http: