An Interactive Intro to CRDTs
13 points by linkdd
13 points by linkdd
Last-Write-Win CRDTs are nice, but I wish the article talked about where CRDT really shine, which is when the state truly converge in a non-destructive way, for example:
While not really useful, they demonstrate this well:
Useful for accounting, or replication of time-series/logs with no master/slave relationship between nodes (where writes would be accepted only on a "master" node).
Similar to Last-Write-Win registers (and maps), but all writes are kept, the value becomes a set of concurrent values.
Each is useful for specific use cases. And since not everybody is making collaborative tools, but many are working on distributed systems, I think it's worth it to mention this.
On another note, the article talks about state based CRDTs, where you need to share the whole state. In the examples I gave above, they are operation based CRDTs, where you need to share the operations done on the state and recompute it when needed.
For example, in the Elixir ecosystem, we have Horde which allows distributing a worker pool over multiple nodes, it's backed by DeltaCrdt.
Delta-CRDTs are an optimization over state based CRDTs where you share state diffs instead of the whole state (described in this paper).