Thanks Roland, For our application, we decided to effectively manage our own persistence instead of using akka persistence.
Thinks like RIAK and Cassandra do a good job of managing redundancy, cross-data-center replication, and strong consistency. Our implementation is now pure CQRS. Our write side is fully segregated from the read side. At somepoint, some actor is managing the sync to our materialized view. We can ensure that someone is only working in one data-center. During a failover, we turn off sync in the Active data center, and turn on sync in the other data center. Both data centers hit the same data base cluster. This allows us to the opportunity to run active / active. Really, we are only interested in running active / passive, but we have to be able to survive updates to multiple data centers during a GSLB failover, because, well, DNS. On Sunday, January 31, 2016 at 4:17:15 AM UTC-5, rkuhn wrote: > > Hi Paul, > > unfortunately it is impossible to make this “just work”—not least because > you would first have to define what that means. Volker mentioned Eventuate > as a possible solution, but this also is not something that “just works”, > it requires your events to be structured such that your defined state > update functions have all the right properties to make it work. > > Imagine there being two copies of yourself running around and doing > things: it would not be enough for one to tell the other what it has done, > there can be real conflicts that arise from these independent actions (like > one of your selves telling your wife that you love her and shortly > thereafter—without having caught up to that point yet—the other files for > divorce). The key here is coordination, without that certain actions cannot > be taken. And coordination can be impossible, e.g. due to network > partitions, which means that you’ll have to decide whether to be cautious > or reckless. > > So, you can use Akka Persistence with the same store in different > locations, but you’ll have to make sure that you don’t emit events to the > same log from different places—there can only be one running source of > truth for each persistenceId at any given time. > > Regards, > > Roland > > 22 jan 2016 kl. 14:52 skrev Paul Cleary <[email protected] <javascript:>>: > > Will Akka Persistence work if you have two different clusters pointing to > the same data store? > > Imagine I have 2 data centers that point at the same database. > > If I have updates happening in both data centers at the same time, will > akka persistence stomp all over the journal / snapshots? > > I know that akka persistence has sequence numbers, and I am not sure how > those are managed. > > It would be great if this just worked, but I am thinking I need to > implement my own persistence plugin and / or persistence layer in my app to > make sure that there are no collisions. > > -- > >>>>>>>>>> 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] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > Visit this group at https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > > > > > *Dr. Roland Kuhn* > *Akka Tech Lead* > Typesafe <http://typesafe.com/> – Reactive apps on the JVM. > twitter: @rolandkuhn > <http://twitter.com/#!/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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
