CRDTs: The Data Structures That Let You Stop Apologizing for Conflicts
Two people edit the same thing on airplane wifi. Both writes are legitimate. Whose wins? Most systems answer with last write wins, which is a polite way of saying we throw away someone's work based on which clock lied less. CRDTs are the family of data structures that refuse the question.
The trick, formally, is designing your data type so that merging two divergent copies is an operation where order does not matter, grouping does not matter, and merging something with itself changes nothing. Get those three properties and replicas can sync in any order, over any topology, any number of times, and everyone converges to the same answer with no coordinator and no conflict dialog.
The intuition is easier than the math. A counter where every node only increments its own slot, and the total is the sum of slots. Merging is taking the max per slot, which you can do in any order and get the same result. A set where deletion is implemented as adding a tombstone rather than actually removing, so adds and removes commute. From those small pieces, people have built maps, lists, and the rich text types under collaborative editors like the ones Figma and various Google Docs style tools rely on.
The costs are real and worth naming. Tombstones accumulate, so sets that see heavy deletion grow unless you garbage collect, which quietly reintroduces some coordination. And convergence guarantees everyone sees the same result, not that the result matches user intent, two people prepending to a list converge to some interleaving, which may surprise both of them.
Where CRDTs earn their keep: collaboration, offline first apps, edge state, anywhere availability matters more than one true ordering. Where they don't: your bank balance. Some conflicts deserve a coordinator.