Thanks for your answer but there is something I don't understand on the cluster sharding.
For exemple imagine that I have 2 nodes : A and B handling a shopping cart (A and B are persistent actors). If I use the cluster sharding and my id is the login of the user. My shard resolver will for exemple route every user with login starting from A to M to the node A and every login starting from N to Z to the node B. First can I add new node dynamically ? Now what append with akka persistence ? Each node will have its own journal ? If I had a node C, the sharding will change now we have A handle login from A to H B handle login from I to P C handle login from Q to Z What append with the journal of nodes A and B ? Is the events rebalanced ? Is the new routing effective only for the new messages ? Last thing, on the activator of akka cluster sharding, the persistentId = self.path.parent.name + "-" + self.path.name. If I start the application twice, I think the persistentId will be the same ? am I wrong ? Thanks in advance for your answers Alexandre. 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.
