System design · Cases: ten designs, worked end to end

Design a chat app

Chat looks like a real-time problem and is really a sync problem, because the network will drop, duplicate and reorder messages no matter how good your sockets are. This works it in interview order, with per-conversation sequence numbers and per-device cursors as the two ideas that make delivery, ordering, offline catch-up and read receipts fall out of one design.

28 min read Full lesson in the app Patterns: per-conversation-sequence, device-cursor-sync, idempotent-send

What you'll be able to do

Before this: real-time-updates, dynamodb-and-cassandra

Log in to read the rest of this lesson

Chat looks like a real-time problem and is really a sync problem, because the network will drop, duplicate and reorder messages no matter how good your sockets are. This works it in interview order, with per-conversation sequence numbers and per-device cursors as the two ideas that make delivery, ordering, offline catch-up and read receipts fall out of one design. This walkthrough runs about 28 minutes, with runnable code you can edit and re-run as you read. A new account gets 7 days of Pro free, no card required.

Log in to continue

The first module of every track is free to read on the web: see what's open in System design.