I'm doing a little sample to learn a bit about Akka.NET. I'm trying to implement a Child-Per-Entity pattern (as seen in Akka.NET Design Patterns ), where I have one actor per user (across a cluster).
To do this I was trying to use a ClusterRouterPool with ConsistentHashingPool, that distributed the messages to some parent actors that kept an IDictionary(int,IActorRef) with the child actors indexed by their id (used as the key for the consistent hash).
This approach however doesn't seem to be working as I initially expected because:
There's a somewhat similar question here on StackOverflow that points to using Akka.Cluster.Sharding, but on Akka.NET Design Patterns Aaron has a comment stating he used the consistent hash router approach, hence why I started it in the first place.
Thanks
I think, that key concept is to understand a difference between Akka.Cluster.Sharding and consistent hash router:
Therefore I think, that cluster sharding is what you're looking for. Inside examples section of Akka.NET core repository you may find a sample which addresses your case directly.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.