Case 9
Storage and Real-Time Transport
Split blob storage, metadata DB, collab server, and CDN for assets.
Step-by-step walkthrough
Real-time path — live editing
- ① Send/receive ops — User A's edits flow over WebSocket to the collab server (OT or CRDT ordering).
- ② Send/receive ops — Server broadcasts transformed ops to User B and other connected editors.
- ③ Heartbeat + cursors — Presence (who is online, cursor position) stored in Redis with TTL.
Persistence path — durable state
- ④ Persist ops + snapshots — Collab server batches operations into Postgres; periodic snapshots bound replay time.
- ⑤ Asset metadata — File pointers and ACL metadata in Postgres; blobs are not inlined in rows.
- ⑥ Signed URL upload — Large images upload direct-to-S3; collab server never proxies multi-MB files.
Why these technologies?
WebSocketS3PostgreSQLsnapshotcompactionRedisCRDTops/s