Skip to content
0:00 / 0:00

#crdt#automerge#collaborativeediting

CRDTs: The Hard Parts

Martin Kleppmann

64K subscribers • 4 videos on Hallway

YouTube
  • Recommended by 3 people: 3 on Hacker News.
  • A classic. People kept recommending it from 2021 to 2024.
  • Presented by Martin Kleppmann, researcher at University of Cambridge
  • Linked in the descriptionSlides on Speaker Deck

Advanced. Deep dive for people who know the field.

90K views6 years ago3 recommendations

Distributed systemsDatabases and dataConsensus: Raft and PaxosReplication and consistencyData structures

Martin Kleppmann explores the complex challenges of implementing CRDTs, focusing on rich text, move operations, and maintaining user intent.

A talk on the latest research on CRDTs, originally given at the Hydra distributed computing conference on 6 July 2020. References: martin.kleppmann.com/2020/07/06/crdt-hard-parts-hydra.html Slides: speakerdeck.com/ept/crdts-the-hard-parts Abstract: Conflict-free Replicated Data Types (CRDTs) are an increasingly popular family of algorithms for optimistic replication. They allow data to be concurrently updated on several replicas, even while those replicas are offline, and provide a robust way of merging those updates back into a consistent state. CRDTs are used in geo-replicated databases, multi-user collaboration software, distributed processing frameworks, and various other systems. However, while the basic principles of CRDTs are now quite well known, many challenging problems are lurking below the surface. It turns out that CRDTs are easy to implement badly. Many published algorithms have anomalies that cause them to behave strangely in some situations. Simple implementations often have terrible performance, and making the performance good is challenging. In this talk Martin goes beyond the introductory material on CRDTs, and discusses some of the hard-won lessons from years of research on making CRDTs work in practice. Bio: Dr Martin Kleppmann is a researcher in distributed systems at the University of Cambridge, and author of the acclaimed "Designing Data-Intensive Applications" (O'Reilly Media, 2017). He mainly works on collaboration software, CRDTs, and formal verification of distributed algorithms. Previously he was a software engineer and entrepreneur at Internet companies including LinkedIn and Rapportive, where he worked on large-scale data infrastructure. martin.kleppmann.com/ twitter.com/martinkl

Why it's here

3 people recommend this

What people say. Widely recommended as the definitive deep dive into the practical difficulties and edge cases of implementing collaborative editing with CRDTs.

rkangelon Hacker News • Recommends

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: link to this video

iamwilon Hacker News • Recommends

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( link to this video ) - Readings in CRDTs( link ) - crdt.tech( link )

williamsteinon Hacker News • Recommends

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: link to this video

benrbrayon Hacker News • Mentions

On “CRDTs are the future”

…g 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 link 1 link 2 link 3 link and link 4 link 5 Kleppmann 2020, "CRDTs: The Hard Parts" link to this video with HN Discussion: link 6 Kleppmann 2019, "Interleaving Anomalies in Text Editors" link 7 link…

sambroneron Hacker News • Mentions

On “Lessons learned from creating a rich-text editor with real-time collab (2018)”

…started building in mid-late 2017, right as CRDTs really started to get competitive with OT, we chose a CRDT approach, but the collab problem space in general is much deeper I realized before getting into it. Anyway, I always appreciate seeing people explain their journey. Especially when it has to do with collaboration. 0 link 1 link 2 link to this video…

thomasikzelfon Hacker News • Mentions

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: link to 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.