CRDTs: The Hard Parts

Martin Kleppmann · 90K views · 2020 · 1:10:10

Open on YouTube

Distributed systemsAlgorithms & data structurestalk

Why Hacker News recommends it

Recommended as an excellent first education on CRDTs and their limits.

What it is

Martin Kleppmann surveys current research on CRDTs, the algorithms for merging concurrent edits across offline replicas. He covers the hard parts such as rich text, moves and merge results that are technically correct but poor.

Recommended by 3 HN commenters across 3 different months, 2020 to 2024.

What Hacker News said

Strong rec rkangel · 2021-01 · on “Decentralised Content Moderation”

The author is a researcher on distributed systems. I found this video from him to be an excellent first education on CRDTs, how they work, what they're good for and what they aren't (yet) good for: [this video]

Recommends iamwil · 2024-01 · on “CRDTs Turned Inside Out”

Ah, I'll put it in as a note in the beginning. You can see a more basic introduction in a previous post I wrote: [LINK] [LINK] Here's some introductory material I found helpful: - [An interactive intro to CRDTs]( [LINK] ) - [An introduction to state-based CRDTs]( [LINK] ) - [CRDTs for non-academics]( [LINK] ) - [CRDT: The Hard Parts]( [this video] ) - [Readings in CRDTs]( [LINK] ) - [crdt.tech]( [LINK] )

Recommends williamstein · 2024-12 · on “Lies I was told about collab editing, Part 1: Algorithms for offline editing”

What they claim is that if all editing stops, then after a period of time everybody will be looking at the SAME document. This is what is meant by "eventual consistency". Achieving this in general is indeed a difficult problem, but (some of) these algorithms do solve it, though it can be tricky to correctly prove that they do. I agree that it is not possible to ensure that the document everybody is looking at is what they actually wanted it to be. However, there are some options for what happens, where some results may be technically correct -- we are all looking at the same thing -- but obviously really bad. This beautiful talk has some examples: [this video]

Cites benrbray · 2020-09 · on “CRDTs are the future”

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

Cites sambroner · 2020-12 · on “Lessons learned from creating a rich-text editor with real-time collab (2018)”

Disclosure: I work on a related project (Fluid Framework) that makes application agnostic CRDTs easily available. The CKEditor folks did a great job building an OSS text editor and they did an especially strong work building a text editor that works well with collaboration. I've made a few OSS rich text editors work (mostly) with Fluid [0, 1] and the design of the text editor really changes how easily collaboration can be added. Luckily the text editor accepts remote changes, integrating an OT or CRDT solution is approximately the same. They also did a great job explaining the problem. My experience has been that people don't intuitively understand why real time collaboration is a tricky pro

Cites thomasikzelf · 2021-12 · on “Where is the CRDT for syntax trees”

We are almost there, for lists and structs there are CDRT's but a move operation across the data structure is missing. Martin Kleppman (from automerge) talks about this in his talk "CRDTs: the hard parts"[0]. I also think a range move or range delete is missing from many of these algorithms. A submission here on HN did implement a range delete on rich text (but I forgot what the name was). [0]: [this video] EDIT: Ah actually Peritext (which you linked to) was the article I was thinking of. I think the range delete would be useful for regular lists as well.