scala-academy / akka-crashcourse

Project for getting a feeling of Akka
1 stars 2 forks source link

Akka routing #17

Open jordi133 opened 6 years ago

jordi133 commented 6 years ago

In order for players like the LinearPlayer to be able to participate in many games simultaneously, we would like to let Akka instantiate several instances of this actor by using Routing.

TimSoethout commented 6 years ago

Wouldn't it make sense to let the game-actor start the players as child-actors?

jordi133 commented 6 years ago

Yes that would be possible, the the Game Actor would require two Props-objects to be instantiated. Would then the GameManager be a better candidate for routing?

TimSoethout commented 6 years ago

I'm not sure. Routing is useful when having a pool of workers for example, using round-robin or similar to spread some jobs on the routees. Maybe if you want to limit the amount of allowed parallel games or something it can make sense to use routers.

jordi133 commented 6 years ago

Hmm lets take this discussion to gitter, for now I'll adjust this story and move to backlog instead of ready