4 ms·
I've spent almost a decade working on CRDTs, largely from an industry perspective but also some academic side. They're great, and not too hard to understand if
by marknadal 9y ago
I've spent almost a decade working on CRDTs, largely from an industry perspective but also some academic side.
They're great, and not too hard to understand if you take time to think about them.
Here are some animated/interactive cartoon explainers we've made to help teach the concepts:
- How a CRDT version of Operational Transformation (Google Docs) works: http://gun.js.org/explainers/school/class.html http://gun.js.org/explainers/school/class.html
- Why CRDTs are better than centralized alternatives like PAXOS/RAFT: http://gun.js.org/distributed/matters.html http://gun.js.org/distributed/matters.html
Martin Kleppmann's work (author of Automerge) is outstanding, especially check out: https://youtu.be/yCcWpzY8dIA?t=29m36s https://youtu.be/yCcWpzY8dIA?t=29m36s
- justinpombrio 9y agoI have a rather specific question, in case you know. What would be the best CRDT algorithm for editing a document consisting of (i) nested lists, (ii) strings, and (iii) some primitive values? I'm looking at Kleppermann's JSON work. But it doesn't look like it handles collaborative editing of strings very well: they have to either be treated as an immutable value in a register, which doesn't allow for collaborative editing of the string, or treated as a list of characters, which would have to represent large edits (e.g. deleting a word) as a sequence of character edits, which sounds inefficient. Kleppermann's work also handles maps, which I don't need, which is fine. For context, I plan to make a tree/structure editor, and am considering representing the document as a CRDT.
- rollcat 9y ago(not an expert) Treating the long string like a list of substrings should work, I guess the optimum substring length could be determined experimentally based on real-world interaction patterns.