akka.net-warehouse-sample icon indicating copy to clipboard operation
akka.net-warehouse-sample copied to clipboard

Router to create product

Open alexsandro-xpt opened this issue 7 years ago • 2 comments

Why you do not use Router to create thoses product Actors?

https://github.com/EdwinVW/akka.net-warehouse-sample/blob/e306213a2b1442d5f02dc94f2280cfabaf9f2d6c/Persistence/Actors/InventoryActor.cs#L21-L23

alexsandro-xpt avatar May 31 '18 16:05 alexsandro-xpt

@alexsandro-xpt Using a Router is a possibility. I could use a Router with a ConsistentHashing algorithm (based on product id) to route messages to the right actor. But I think it would be a bit more complex as the current implementation with a for loop. Do you see any specific advantages with using the router?

EdwinVW avatar Jun 16 '18 12:06 EdwinVW

@EdwinVW talking about your code with some people, the discussion was about resource management over actor creation, the Router could manage better those resource.

I'm new in Actor Model and Akka, I'm using your code and other codes for studies to learn about Akka.net.

I want to create a concept proof using Akka Cluster over Docker and using Akka to guarantee the concurrence between object at my domain from database. I'm learn how can I do that with Akka.

alexsandro-xpt avatar Jun 21 '18 19:06 alexsandro-xpt