Collaborative document offline sync
Your task
Design the sync engine for a collaborative document editor where users edit offline on phones/laptops and sync when reconnected. Two users can concurrently edit the same paragraph, and concurrent edits must merge without a server-side lock and without losing characters. Scale: docs up to a few MB, hundreds of collaborators per doc, sync over flaky mobile networks. Pick a conflict-resolution strategy and justify it against the alternative.
It covers
- Crdt
- Operational transform
- Offline sync