You can send messages directly to the soldier actors. The ActorRefs will be valid until the actors are stopped. I don't know about your domain/design to give any precise advice if that is better than sending messages via the parent. An advantage of sending everything via the parent is that it could manage the lifecycle of the children based on incoming messages, e.g. create them when needed, and stop them if they are not used any more.
/Patrik On Tue, Aug 12, 2014 at 11:19 AM, 09goral <[email protected]> wrote: > I am developing a War simulation, where two armies are fighting each > other. In my app each Actor 'contains' a soldier field. Each soldier has > something like visibility range (matrix NxN). I have been reading about > ordering in distributed systems, vector clocks etc and I can't warp my head > around it and find neat solution yet. But my question is different. Is it > ok for let's say Soldier1 form army A to receive from *WorldActor *ActorRefs > to enemies that are in his visibility range and make him *talk/attack > *directly > to them or is it better to send my decision message to *WorldActor *and > let him make all the calls? > > > <https://lh6.googleusercontent.com/-kzGeYtJJJH0/U-nbnnL-WII/AAAAAAAADG0/La7Zx1_aYS0/s1600/diagram1.png> > > -- > >>>>>>>>>> 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. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> 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.
