I want to use Akka.Cluster for simple user profile service. There will be few instances of http-api services witch will send messages for some backend instances with userprofile persistent actors(Profile Actor). Every http-api service can send message for same Profile Actor, so I should use Consistent Hashing Group router. But if I'll use group router, I should for every Profile Actor add route to group router, as I know, it's impossible. I can't use pool router, because every instance of http-api with pool router, will create his own Profile Actor for one user. How can I implement user's profile with akka.cluster? Maybe it's exist some patterns for same situations?
Asked
Active
Viewed 184 times
0
-
http://blog.geist.no/an-actor-model-example-with-akka-net/ – neftedollar Sep 21 '15 at 22:16
1 Answers
0
Solution 1: Akka Cluster Sharding will be useful. See at Cluster Sharding
Solution 2: Custom routing. This solution is simple to move to Akka.NET.

Vers_us
- 193
- 1
- 2
- 9
-
Thank you, but first solution not useful because it will one cluster shard with few nodes. About Custom routing is useful, but I don't like this solution because routers are specific actors with functionality of fast forwarding,simple actors are not so fast. – neftedollar Aug 26 '15 at 20:33
-
In first solution you can implement shardId() method in ShardRegion.MessageExtractor interface (valid for Java). This method is used to determine the number of shard. – Vers_us Aug 26 '15 at 22:21
-
Oh, I understand. It' cool but cluster sharding not yet exist in Akka.net – neftedollar Aug 27 '15 at 10:32