Hi Eugene,

could you clarify the use-case a bit more? Why would there be multiple
FSMs, where would the messages to be processed come from, why can’t you use
the work pulling
pattern<http://letitcrash.com/post/29044669086/balancing-workload-across-nodes-with-akka-2>
?

One thing to note: saying “lock” is rarely the right answer in an actor
system ;-)

Another remark: a cluster singleton will be resurrected on a different node
if its current host fails, and if you make it persistent you can even keep
its state around, so “singleton” does not mean SPOF in this context.

Regards,

Roland



On Thu, May 8, 2014 at 12:37 AM, Eugene Dzhurinsky <[email protected]>wrote:

> Hello!
>
> I need to have a set of FSM front-end actors in the cluster. I want to be
> able to recognize what state does the actor has for the moment, to decide
> if this actor could be used to process a message (it's in the *Accept*state).
>
> The ony thing I can think about is to get a list of all actors (which is
> easy - I need just join the cluster and process all *MemberUp* events,
> filtering actors by roles), and *ask* every actor to process a message.
> If an actor from the list responds with *Accepted* - then it's ok, if no
> - then save the message for a further processing and wait until one of
> "busy" actors will return result and drop into *Await* state.
>
> I don't really like this approach, since it's rather complicated - perhaps
> somebody could advice? I don't either want to have a "singleton" actor in
> the cluster which will control entire state of the cluster, since it will
> become an SPOF.
>
> Thanks!
>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Akka Team
Typesafe - The software stack for applications that scale
Blog: letitcrash.com
Twitter: @akkateam

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to