3 ms·
CRDTs seem very promising, but we still have a long way to go. The most exciting work in this area is being done by Ink&Switch [0]. They have a number of inte
by benrbray 6y ago
CRDTs seem very promising, but we still have a long way to go. The most exciting work in this area is being done by Ink&Switch [0]. They have a number of interesting real-world app prototypes based on CRDTs.
- 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]
[0] https://inkandswitch.com/ https://inkandswitch.com/
[1] https://github.com/xi-editor/xi-editor/issues/1187#issuecomment-491473599 https://github.com/xi-editor/xi-editor/issues/1187#issuecomm...
[2] https://news.ycombinator.com/item?id=19886883 https://news.ycombinator.com/item?id=19886883
[3] https://github.com/automerge https://github.com/automerge and https://github.com/automerge/pushpin https://github.com/automerge/pushpin
[4] https://marijnhaverbeke.nl/blog/collaborative-editing.html https://marijnhaverbeke.nl/blog/collaborative-editing.html
[5] Kleppmann 2020, "CRDTs: The Hard Parts" https://www.youtube.com/watch?v=x7drE24geUw https://www.youtube.com/watch?v=x7drE24geUw with HN Discussion: https://news.ycombinator.com/item?id=23802208 https://news.ycombinator.com/item?id=23802208
[6] Kleppmann 2019, "Interleaving Anomalies in Text Editors" https://martin.kleppmann.com/papers/interleaving-papoc19.pdf https://martin.kleppmann.com/papers/interleaving-papoc19.pdf
[7] https://abishov.com/xi-editor/docs/crdt-details.html https://abishov.com/xi-editor/docs/crdt-details.html
- yawrp 6y agoYou might enjoy this piece, covers a few of the tradeoffs you mention https://hex.tech/blog/a-pragmatic-approach-to-live-collaboration https://hex.tech/blog/a-pragmatic-approach-to-live-collabora...