Re: [akka-user] Re: Performant SequenceID Generation

2016-08-02 Thread Patrik Nordwall
You're welcome

tis 2 aug. 2016 kl. 19:40 skrev Dagny T :

>
> Thank you, Jim and Patrik for your responses!
>
> Looking into the VersionVector.scala.
> Always amazed at what a good source of learning it is to see
> well-structured, code-reviewed Open Source(!)
>
> THANKS again!
> D
>
> On Thursday, July 28, 2016 at 11:23:46 AM UTC-7, Dagny T wrote:
>>
>>
>> So, in the context of async messaging systems where you can't predict the
>> sequencing of incoming messages.
>>
>> Typically, you have in the message (or event) payload:
>> - an Originating Entity Unique ID
>> - then a Version or Sequence ID for each incremental state-change event
>> on that originating entity
>>
>> So, if I need to initialize EntityID Generation, as well as its sub
>> VersionID Generation across a distributed cluster;
>>
>> Does AKKA provide an out-of-box configurable Sequence ID Generator
>> service cluster?
>> Otherwise, how is this typically handled in AKKA, and where can I get
>> sample code which demonstrates this?
>>
>> THANKS!
>> D
>>
> --
> >> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Performant SequenceID Generation

2016-08-02 Thread Dagny T

Thank you, Jim and Patrik for your responses!

Looking into the VersionVector.scala.  
Always amazed at what a good source of learning it is to see 
well-structured, code-reviewed Open Source(!)

THANKS again!
D

On Thursday, July 28, 2016 at 11:23:46 AM UTC-7, Dagny T wrote:
>
>
> So, in the context of async messaging systems where you can't predict the 
> sequencing of incoming messages.
>
> Typically, you have in the message (or event) payload:
> - an Originating Entity Unique ID
> - then a Version or Sequence ID for each incremental state-change event on 
> that originating entity
>
> So, if I need to initialize EntityID Generation, as well as its sub 
> VersionID Generation across a distributed cluster; 
>
> Does AKKA provide an out-of-box configurable Sequence ID Generator service 
> cluster?
> Otherwise, how is this typically handled in AKKA, and where can I get 
> sample code which demonstrates this?
>
> THANKS!
> D
>

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: Performant SequenceID Generation

2016-08-02 Thread Patrik Nordwall
There is a public version vector implementation in akka-distributed-data,
if that is what you are looking for.
https://github.com/akka/akka/blob/master/akka-distributed-data/src/main/scala/akka/cluster/ddata/VersionVector.scala

/Patrik
fre 29 juli 2016 kl. 05:08 skrev Jim Hazen :

> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.