by benrbray · 6y ago · 0 comments
- An interesting case where CRDTs failed is Xi-editor, where they tried to use CRDTs as the basis for a plugin system [1,2].
- One of the biggest problems with CRDTs is the overhead needed to keep track of the full document history. The automerge [3] project has been working on efficient compression of CRDTs for JSON datatypes.
- The idea of monotonic updates is really appealing at first, but I was disappointed when I realized there's no good solution to handle deletions. Tombstones, to me, seem like kind of a hack, albeit a necessary one. Practically, CRDTs aren't the silver bullet they might seem like at first.
- Another lesson learned is that when ten people are editing the same paragraph, there's not really a right answer. I think the key to implementing CRDTs is doing it at the correct level of granularity.
- ProseMirror intentionally chose NOT to use CRDTs [4].
- Some more good references are [5,6,7]
[1] https://github.com/xi-editor/xi-editor/issues/1187#issuecomm...
[2] https://news.ycombinator.com/item?id=19886883
[3] https://github.com/automerge and https://github.com/automerge/pushpin
[4] https://marijnhaverbeke.nl/blog/collaborative-editing.html
[5] Kleppmann 2020, "CRDTs: The Hard Parts" https://www.youtube.com/watch?v=x7drE24geUw with HN Discussion: https://news.ycombinator.com/item?id=23802208
[6] Kleppmann 2019, "Interleaving Anomalies in Text Editors" https://martin.kleppmann.com/papers/interleaving-papoc19.pdf