The only thing I miss here is a clear spec of the CRDT itself so that people could implement compatible versions in other languages.
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
- Why CRDTs are better than centralized alternatives like PAXOS/RAFT: 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
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.
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.
Not really, obviously, but given that one of the big sub-topics of CSCW and CSCL is about designing for remote collaborative work, CRDT looks like a technology that naturally fits in there.
I'm surprised those apps haven't made a bigger effort to implement this logic for production. It would certainly make them unique and hard to leave.
I haven't compared them though.
This is my second time highly recommending a Software Engineering Daily podcast with Martin Kleppman on it. He is really smart and able to break down really complex topics in a way that's easy to understand. If you've never heard of CRDTs before, have a listen - https://softwareengineeringdaily.com/2017/12/08/decentralize...
A pretty neat workable representation.
Trivial to implement.