Hi Brian,

thanks for sharing your ideas.

Am 11.12.2017 um 01:13 schrieb Brian Topping:
> What if you kept the shard for the geographies and removed it for the
> users, keeping the latter persistent all the same. Then spread the
> persistence configuration for users across the cluster (I use ZK for
> this). The user could then be restored as a child of the geography by
> the sharded geography actor, on that same node.
> 
> A basic implementation would require that the user actor was on one
> node at a time. You might want some security against the user actor
> being started in multiple geographies. It might be completely
> reasonable for the user actor to be multiply available like that,
> maybe by wiring distributed PubSub into the persistent user actor
> event loop. I haven’t thought though the scalability or performance
> of this, just offering ideas.

Starting player actors as children of geographical regions would provide
locality, and making them PersistentActors would allow (re)starting them
on a different machine as needed.

But that leaves me without all the good stuff that Akka Cluster Sharding
provides:

* Efficient (in terms of latency and bandwidth) lookup of where a
specific player actor currently "lives", i.e. sending a message to it
based on the player's ID

* Ensuring uniqueness while migrating to a new node,

* while ideally minimizing loss of messages while doing so.

The algorithms used in Cluster Sharding rely on a stable mapping from
entityId to shardId. I am looking for a way to get as close as possible
based on a mutable mapping that changes infrequently.

- Arno

PS: What is ZK? I googled it but found only a web framework by that name.

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to