EXPERTReal-time Systems
Design Figma/Google Docs
Design a real-time collaborative editing system supporting multiple simultaneous editors with conflict resolution.
Estimated Time: 45 minutes
#CRDT#OT#Real-time Sync#Collaboration
Solution Overview
Use Operational Transformation (OT) or CRDTs for conflict-free editing. WebSocket for real-time sync. Implement cursor presence.
Hints to Get Started
1
How to handle concurrent edits?
2
OT vs CRDT tradeoffs
3
Offline editing support
Storage
Document snapshots + operation log
Sync Protocol
Client sends operations, server transforms and broadcasts
Conflict Resolution
- •Operational Transformation
- •CRDTs (Conflict-free Replicated Data Types)