I think what you're looking for here is called a vector clock.  Akka uses 
them internally within its clustering implementation, however the 
implementation isn't public.

There are some open source scala/java implementations you might want to 
evaluate (Google).  I don't have experience with any of them.

The problem is more annoying than it sounds.  You need a causal sequence of 
events (ie, this mutation happened from observation of state x), not just 
an increasing ID.  Vclocks help with that.  But then your app needs to deal 
with merge conflicts and resolution.  Plus your clients need to be vclock 
aware since you pass the current vclock along with your update.  There are 
additional issues with vector clocks as well, but you're asking to solve a 
very complex distributed problem.

The Basho guys (developers of the distributed Riak DB) have some good 
material on vclocks.  They've also apparently moved from vclocks to Dotted 
Version Vectors.

If you want to start down the rabbit hole start here:
http://docs.basho.com/riak/kv/2.1.4/learn/concepts/causal-context/#dotted-version-vectors

If you want to take a look at an implementation (and detailed description 
of how it works) start here (the code is in Erlang, but the conceptual 
diagrams of the algorithm are portable to any lang):
https://github.com/ricardobcl/Dotted-Version-Vectors

-- 
>>>>>>>>>>      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