Design a Collaborative Editor (Google Docs), stage 2 of 12: decide
Choose the transport
Each active editor streams 5-10 small operations a second to the server and receives everyone else's from it, ideally within 200 ms. Order matters: an editor's operations depend on the ones before them.
System so far· 2 parts
Select a component to see what it is responsible for and which state it owns.
What you need to know
0 of 1 checks done
Transports differ in direction, overhead and ordering:
Transport Direction Ordering of one client's messages Polling client asks each request separate Server-Sent Events server → client ordered downstream only HTTP POST per op client → server separate requests can arrive out of order WebSocket both ways, one connection ordered both ways See Server push: polling, long polling, SSE, WebSockets and Persistent connections.
Check
Each keystroke is a separate POST. Op 2 is sent before op 3, but op 3's request arrives first. What must the server do?A persistent socket comes with commitments: heartbeats to detect dead clients, a protocol to resume after reconnecting, and a plan for deploys that close every socket.