Creating a collaborative app using CRDTs

Pierre Hedkvist
Apr 1 · 8 min read

Commutative: a*b=b*a
Associative: (a*b)*c = a*(b*c)
Idempotent: (a*a) = a

* = binary operation, example: max, union, or

Commutative: max(a,b) = max(b,a)
Associative: max(max(x,y),z) = max(x,max(y,z))
Idempotent: max(x,x) = x

Commutative: (a ∪ b)= (b ∪ a)
Associative: (a ∪ b) ∪ c) = (a ∪ (b ∪ c))
Idempotent: (a ∪ a) = a


G-Counter (Grow-only)




Pierre Hedkvist

Written by

Software Engineer from Sweden

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade