So the use case is best described as a large virtual world where you have thousands of ai controlled bots.
Requirements: - bots need to have a 'tick' message several times a second - bots need to be restarted on another node if they node they are on goes down - bots are named and unique in the cluster The design I am using is every node has a bot controller. On startup it reads in the list of all bots that should be running on the cluster. The controller uses consistent hashing to hash bot id's to node hostnames. With this the controller can determine which bots it is responsible for. Every time a node joins/leaves the cluster, the controller rehashes the global bot id list, and creates/destroys bots as necessary to make sure it is only running the bots assigned to it. I handle the tick by having the controller run a schedular which sends a message to itself, which then triggers the controller sending an 'update' message to all of it's bot children. The tick is normally every 100ms. I was trying to avoid using a cluster singleton or any design based on the concept of having a 'master' that manages all the nodes. Curious if anyone has done something like this before and has found a better approach? I'm not unhappy with it, but that doesn't mean there isn't a better way. Chris -- >>>>>>>>>> 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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
