Ok I understood that each persistent actor have for name the id used for the shard so there will as many persistent actor as users/shopping cart in my exemple (if I use the persistent id used in the activator ie self.path.parent.name + "-" + self.path.name) . We can't have one persistent actor handling all the users for a node.
I did some test with two nodes : A and B. I start my tests and the events goes to node A and are written to the journal. I stop A and the I can see the command arriving to B but no event are created on the journal. Is there something to take care to make this working ? Thanks, Alex Le samedi 12 juillet 2014 19:04:13 UTC+2, Alexandre Delegue a écrit : > > Hi, > > I have some questions about akka persistence and scalabity and how to > implement certain use case. > > The idea is to have an application that I can clone depending on the load. > With akka persistence (event sourcing), if I clone an app I will have N > persistents actor with the same persistent id : > - If the journal is distributed each instance of persistent actor will > write on the same journal. No problem if the order of the events stays the > same. > - If the state is persisted on DB, each node will share the same state. > There is a problem when the persistent actor of each node start and replays > the events from the journal, the state will be updated from different > source and will be wrong. I can't persist the state on memory if I have to > much element to deal with. > > What is the best way to deal with this problem ? > > For exemple if I have a shopping cart and the events are the actions the > users can perform (create cart, add item, order ...) how can I scale that > with akka persistence and event sourcing ? > > Thanks, > Alex > > -- >>>>>>>>>> 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.
