13/17
Part 5 of 7 · Sharing and editing togetherLearn
Editing at the same time
Three ways to handle two people editing one prompt:
- A lock: one editor at a time. Simple, and everyone else waits.
- Last writer wins: Figma does this for a property two people change at once, keeping the last value sent to its server.
- A CRDT, a conflict-free replicated data type: a structure whose copies merge to the same result in any order. Yjs is a CRDT library for exactly this kind of shared editing.
Two people type into the same sentence of the template at the same moment. With last writer wins on the whole template, what happens?
At the same moment, one person types into the template and another changes the temperature. Which of the two needs a CRDT?
Pick an answer above to see the rest