News for hackers. Stuff that matters.
Re:Automerge: JSON-like data structure for building collabor... by biztos on Monday February 05, 2018 @02:19PM (#16311217)
Conflict-free Replicated Data Type[0], for anyone else who didn't know what CRDT means.

[0]: https://en.wikipedia.org/wiki/Conflict-free_replicated_data_...

Re:Automerge: JSON-like data structure for building collabor... by vanderZwan on Monday February 05, 2018 @02:56PM (#16311521)
Thanks, I didn't and wondered if it had anything to do with Computer-supported Collaborative Work or Computer-supported Collaborative Learning (CSCW and CSCL, respectively[0][1]).

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.

[0] https://en.wikipedia.org/wiki/Computer-supported_collaborati...

[1] https://en.wikipedia.org/wiki/Computer-supported_cooperative...

Re:Automerge: JSON-like data structure for building collabor... by skrebbel on Monday February 05, 2018 @02:32PM (#16311330)
Yes, thanks!
Re:Automerge: JSON-like data structure for building collabor... by marknadal on Monday February 05, 2018 @03:37PM (#16311920)
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

- 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

Re:Automerge: JSON-like data structure for building collabor... by justinpombrio on Monday February 05, 2018 @09:01PM (#16313911)
I 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.

Re:Automerge: JSON-like data structure for building collabor... by rollcat on Tuesday February 06, 2018 @03:55PM (#16319485)
(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.