I have rather simple setup - a singleton actor, which takes tasks from 
outside of the cluster. This actor maintains set of "worker" actors, 
deployed to the cluster via the *consistent-hashing-pool* router - so it 
doesn't have the references to workers directly.

Now I need to "register" the worker actors in the singleton in order to 
implement the "pooling pattern" - so the workers will query singleton for 
more work using "ask".

Inside a worker actor the call to "context.parent" will return the 
reference to the router, and if a message would be sent to this reference - 
it will not be dispatched to the "singleton" actor, as far as I learned 
from the docs.

Now I see at least 2 ways of passing a reference to a singleton actor:

1) pass the reference to the "singleton" actor as an argument to the 
constructor of the "worker" actor. This could be a string with the physical 
address of the "singleton" of reference - not sure which would work better?

2) in the broadcast message about a new work awailable include the 
reference to self (not sure how to do it either)

What is the preferred way to solve such task of passing a reference to the 
"singleton actor"?

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.

Reply via email to