6 ms·
Best paper I read was "Conflict-free Replicated Data Types (2011)". https://pages.lip6.fr/Marek.Zawirski/papers/RR-7687.pdf https://pages.lip6.fr/Marek.Zawirsk
by LAC-Tech 4y ago
Best paper I read was "Conflict-free Replicated Data Types (2011)".
https://pages.lip6.fr/Marek.Zawirski/papers/RR-7687.pdf https://pages.lip6.fr/Marek.Zawirski/papers/RR-7687.pdf
CRDTs get a lot of hype on HN, 95% of the time it's for collaborative editing. But they're much more than some JS library to build an app around - they're a formalism of distributed systems that are strongly eventually consistent. What this means is if the mathematical properties [0] of CRDTs hold, there's no conflicts, no rollbacks, no user intervention - provided the same data is received by every node (in any order, mind you), they will all be in an identical state without a consensus.
For me this is massive, and I'm convinced this has big industrial applications, ie distributed systems in domains where the source of truth is most naturally modelled as append only events. In this scenario, the whole database is a single CRDT.
Also - and I hope I'm not outing myself as a pleb here - but each time I re-read it I discover new things, stuff I might have glossed over, didn't fully understand, or didn't appreciate before.
So yeah, have to hand it to this paper. It's really broadened my horizons.
[0] way less scary than you think. If you're comfortable with first year abstract algebra, operations, sets, relations etc you'll be fine.
- random_sequence 4y agothanks for sharing this. Was looking to read about the space.
- scatterhead 4y ago> In this scenario, the whole database is a single CRDT. But why? These ideas are elegant but usually not practical. Performance usually ends up forcing us back to ole faithful (mutability).
- LAC-Tech 4y agoIn this scenario I am talking about an append only data model. I admit to not understand the concept of an immutable database.
- strls 4y agoCRDTs are useful to be aware of, but they are not a silver bullet they might appear based on the paper and online sources. They are conflict-free only because they hide conflicts by forcing a consistent order on concurrent updates. How do they do it? By using logical clocks to version events. A logical clock is not magic. It orders concurrent events arbitrarily. Is this correct? In practice, probably not, meaning that more recent updates can be lost in favor of less recent updates. What does 'recent' mean? For a user it means latest in physical time. Just because the system doesn't know any better than to arbitrarily order a pair of events (that appear concurrent), doesn't mean the user doesn't know which event comes first. This is why not everything is implemented as a CRDT and conflicts will always exist in use cases where updates must never be lost.