Hi Chanan, 14 apr 2014 kl. 15:23 skrev Chanan Braunstein <[email protected]>:
> Hi Roland, > > Thanks for your answer. I haven't looked at what can be done in cluster yet > as I was trying to figure things out in one jvm first before I move to multi > jvm, but I guess I missed an important piece. I will go look at now. > > As to the first part of you answer, I don't think I fully understood your > meaning: > > You are right, in my test of akka-persistence, I was creating actors directly > instead of with a parent and I didn't think of using context.child(), which > would solve the problem once I have the parent, but doesn't that just move > the problem to get/create of the parent? > > I am not sure what you meant "The other consideration is that you seem to be > using actor hierarchies to directly represent the identity of domain > entities...". My understanding that if I were to create the usual software > programming example: Bank. And I wanted to use Akka-Persistence, I could > model an Account as an actor (Maybe SavingAccount, CheckingAccount, etc.) > where each account gets its own Account with the path being > /user/accounts/account-<account_number>. Is that not a good idea? Yes, it is a good idea, and it means that you will have to create an actor called “accounts” using `system.actorOf()`, and only that actor can then create child actors for each account. That is the parent I meant. In practice you will then send a message to the parent “do something with account X” and the parent will then get-or-create “account X” and do something with it. Regards, Roland > > Thanks, > Chanan > > -- > >>>>>>>>>> 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. Dr. Roland Kuhn Akka Tech Lead Typesafe – Reactive apps on the JVM. twitter: @rolandkuhn -- >>>>>>>>>> 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.
