Real Time Updates easy
When two users edit a Google Doc at the same time, what ensures they see each other's cursors moving?
- A The browser refreshes every 5 minutes.
- B A real-time connection (WebSocket/Long Poll) broadcasts coordinate changes instantly.
- C They must save the document to see changes.
- D Email notifications.
Answer: B. A real-time connection (WebSocket/Long Poll) broadcasts coordinate changes instantly.
Collaborative apps rely on a persistent stream of small events ({user: 'A', x: 10, y: 20}) sent to all connected clients to render the 'Ghost Cursor' effect.
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?