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]>:
> 
> 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/ <http://akka.io/docs/>
> >>>>>>>>>> Check the FAQ: 
> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html 
> >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html>
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user 
> >>>>>>>>>> <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] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/akka-user 
> <https://groups.google.com/group/akka-user>.
> For more options, visit https://groups.google.com/d/optout 
> <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.

Reply via email to