Real Time Updates hard
For a peer-to-peer collaborative editor (like Figma or Google Docs offline mode), why might you choose CRDTs (Conflict-free Replicated Data Types) over Operational Transformation (OT)?
- A OT requires a central server to strictly order operations and resolve conflicts. CRDTs are mathematically designed to converge to the same state on all clients eventually, regardless of message order or network topology.
- B CRDTs use less memory.
- C OT is deprecated.
- D CRDTs support binary files.
Answer: A. OT requires a central server to strictly order operations and resolve conflicts. CRDTs are mathematically designed to converge to the same state on all clients eventually, regardless of message order or network topology.
OT is the standard for server-centralized editing (Google Docs). CRDTs enable decentralized/offline-first editing because they allow merging concurrent edits without a central source of truth.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- When a mobile app is closed/backgrounded, it cannot keep a WebSocket open. How does it receive real-time alerts (like 'New Message')?
- For a human user, what is generally considered the maximum acceptable latency for an interaction to feel 'Real-Time' (e.g., typing in a Google Doc)?
- If you want to update a news feed on a website every time a new article is published, what is the simplest (but least efficient) 'Real-Time' technique?
- In a persistent real-time connection, what is the purpose of a 'Heartbeat' or 'Ping/Pong' message?
- Why is Short Polling considered 'Chatty'?
- Server-Sent Events (SSE) are ideal for which type of real-time application?