[erlang-questions] Way of using CRDT?

Jordan West <>
Thu Mar 24 20:25:32 CET 2016

Originally, the Basho/Riak community referred to version vectors as vector
clocks and some of this naming is still evident, like in the examples you
mention. As you stated, how you use the data structure conveys whether or
not it is a version vector or a vector clock. The dotted version vector is
now considered the more correct data structure to use on the server because
it removes the potential for concurrency anomalies (as discussed in the
repo you linked) but some projects either a) do not have a use case that
would trigger that anomaly so they choose to use version vectors (perhaps
accidentally called vector clocks) or b) have not run into/proven the
anomaly to themselves and have not invested time to fix it as a result
(this was the case for Riak pre-2.0).

Hope that helps,

On Tue, Mar 22, 2016 at 8:51 PM, LiuZhen <> wrote:

> Hi All,
> Recently I was trying to set up a prototype app with riak-core. It all
> went smooth until ran into CRDT.
> I have read:
>    1. papers about CRDT from HAL
>       1. `Conflict-free Replicated Data Types’ at
>       https://hal.inria.fr/file/index/docid/609399/filename/RR-7687.pdf
>       2. `A Comprehensive Study of Convergent and Commutative Replicated
>       Data Types’ at https://hal.archives-ouvertes.fr/inria-00555588/
>    2. `Version Vectors are not Vector Clocks’ at
>    https://haslab.wordpress.com/2011/07/08/version-vectors-are-not-vector-clocks/
>    3. `Dotted Version Vector Sets' at
>    https://github.com/ricardobcl/Dotted-Version-Vectors which by the way
>    is used in riak-core for meta
>    4. Project-FiFo’s fifo_dt at https://github.com/project-fifo/fifo_dt
> Then which following understandings are wrong?
>    1. Version vector is for state-based crdt; vector clock is for
>    op-based crdt
>    2. From #1, riak and similars use state-based CRDT, then it should use
>    version vector rather than vector clocks
>    3. Dotted version vector is more compact than plain version vector
>    4. The reason fifo_dt and similars are using vclocks is because
>    basicly vclock’s static structure is the same as version vector, but since
>    the update rule is not the same, why it is used in fifo_dt?
>    5. To explain #4, the object combining value & vclocks can be thought
>    as a way of state-based crdt without using version vector
> What is the *most updated & correct* way of doing this?
> _______________________________________________
> erlang-questions mailing list
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160324/ed389c7e/attachment.html>

More information about the erlang-questions mailing list