Skip to content
playdsa
Preferences

Make yourself comfortable.

Saved on this browser. Your device’s reduced-motion preference is always respected.

Theme
Advanced settings

Conversation Ledger

Learn
Play
Prove
Problem context and objectives
Mission briefing

Lead systems engineer · Conversation Ledger

Design storage for a multi-device chat service with ordered conversation history, unread counts, and message edits.

The design must survive messages 2M/s peak and history years. Every box must earn its place by satisfying a requirement or containing a failure.

How you win

  1. 1Trace one user action from request to durable outcome
  2. 2Connect every component to a stated requirement
  3. 3Explain the losing tradeoff, not only the chosen technology

Rules and pressure

  • messages: 2M/s peak
  • history: years
  • Conversation ordering
  • Cursor pagination
Lesson 1 of 3

Live architecture trace

Conversation Ledger: request to outcome

1/5
◉Chat clientsclient◇Realtime gatewayedge⬡Chat serviceserviceDBMessage logdata⇥Delivery queuequeueWKDevice workersworker
LIVE EVENTsocket

Chat clients sends “socket” to Realtime gateway. Partitioning by conversation and sorting by a server sequence matches ordered, cursor-based history reads.

messages = 2M/s peak

Design storage for a multi-device chat service with ordered conversation history, unread counts, and message edits. Follow one real user action through the complete architecture; a component is useful only when you can explain the request, state, or failure it handles.

Help shape PlayDSA

Something confusing, broken, or missing? Leave a quick note without leaving your lesson.

Please leave out passwords, payment details and other private information.

Page included: /

Sign in to save feedback here, or send it with your email app. Your draft stays here while you sign in.

Open email instead