i think distributed pub-sub is what you need:
http://doc.akka.io/docs/akka/2.3.8/contrib/distributed-pub-sub.html
(somewhat hidden under 'External Contributions').
-Michael
On 12/23/14 08:33, Terry Heinze wrote:
Hi,
I'm just in the early stages of migrating a simulation that uses the
old Scala Actors to use Akka instead. The application generates a very
large pool of stateful actors that inter-communicate with each other.
The functionality in the cluster sharding example (the one the creates
blog posts) is quite close to what I need. What I haven't discovered
yet is an obvious way to let one actor in the cluster broadcast a
message to all of the other actors in the cluster (or a large subset
of the cluster) for affinity propagation.
I tried a simplistic approach of just sending to a masked path, but
that only sent the message to the actors that were on the same node
and not the entire cluster.
context.actorSelection("/user/sharding/MyPool/*") ! Notify(*"Hi, I was
just added"*)
It seems like I should be sending the message to the shard region
instead, but the examples I'm finding only show using an IdExtractor
to locate a specific actor in the cluster and not to the entire
cluster. The secondary shard region in the blog example stores a
subset of the cluster (the author listings) is basically the tactic I
use in the original simulation (an external mutable map of actor
references).
Is there a recommend way to implement broadcasting?
--
>>>>>>>>>> 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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
--
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.