Sam Elliott
October 30, 2013
1.9k

CRDTs: An UPDATE (or just a PUT)

Riak 2.0's Data Types, presented at RICON West 2013, in SF.

A Few links for the interested:
- Dotted Version Vector Sets, a nice explanation: https://github.com/ricardobcl/Dotted-Version-Vectors#readme
- Our datatype repo: https://github.com/basho/riak_dt
- Comprehensive study of Convergent and Commutative Replicated Data Types (tech report): http://hal.upmc.fr/inria-00555588
- Optimised OR-Set (paper): http://arxiv.org/abs/1210.3368
- Dotted Version Vectors (paper): http://arxiv.org/abs/1011.5808
- Semilattices (wiki): https://en.wikipedia.org/wiki/Semilattice

October 30, 2013

Transcript

3. Not Only Me Russell Brown Sean Cribbs Chris Meiklejohn Carlos

Baquero (UMinho)

61. ORSWOT: Merge Element In Both: Merge Dots Element In Only

One: Drop when Dominated by Other’s VV Keep Otherwise

63. Maps VV ⊠ ( Field , Type ) → (

[ Dot ] , Value )
64. Map: Update Apply Update to Value Increment VV Add Dot

to Field’s Dots

67. Map: Merge Field In Both: Merge Dots Field In Only

One: Drop when Dominated by Other’s VV Keep Otherwise

71. C. Remove: What We Want add(a) remove(a) {a,b} {a,b} {a,b}

{a,b} {a,b} Sᵢ₊₁ Sᵢ
72. C. Remove: The Incorrect Solution add(a) remove(a) {a,b} {a,b} {b}

{a,b} {a,b} Sᵢ₊₁ Sᵢ Sᵢ₊₁ = op(Sᵢ) Sᵢ
73. C. Remove: The Correct Solution add(a) remove(a) {a,b} {a,b} {a,b}

{a,b} {a,b} Sᵢ₊₁ Sᵢ Sᵢ₊₁ = opᵤ(merge( Sᵢ , opᵣ() ) )

76. Split Brain: What We Want remove(a) {a,b} {b} {b} {b}

(eventually) {a,b}
77. Split Brain: The Incorrect Solution remove(a) {a,b} {b} {a,b} {b}

Error Sᵢ₊₁ = op(Sᵢ) (eventually) {a,b} Sᵢ₊₁ Sᵢ
78. Split Brain: The Correct Solution remove(a) {b} {a,b} {b} (eventually)

{a,b} {a,b} Sᵢ₊₁ = opᵤ(merge( Sᵢ , opᵣ() ) ) Sᵢ₊₁ Sᵢ