Index

The last vada (inventory contention and locking)

The Right Book for the Job
The Right Book for the Job · Open board

The shelf of books a system keeps its facts in. This lesson opens one of them at a single line, the one that says how many vadas are left, and asks what happens when fifty people write on it at once.

Before you start. From The Right Book for the Job (databases, deeply) you need the book itself: the database, where the stall writes its facts down and reads them back, and which can bundle a few reads and writes into one all-or-nothing unit called a transaction. Transactions showed two such units reading the same line and both writing from it, so one write silently erased the other; The Two Ledgers Must Agree (Distributed Transactions) showed a lock left down by a helper who vanished, freezing everyone behind it; and Charged Twice (idempotency & exactly-once) showed that a retried request must carry one name for one intent, so the second try is not a second charge. Each comes back when it is needed.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Lab

Fourteen real queries, six datastores. Which one answers yours without a second system?

Pick A wall of numbered boxes, press Add next question fourteen times, and watch Where the fourteen went fill elsewhere.

Open The right book for the job →

Ten vadas left and a crowd reaching at once. How does the stall sell exactly ten, and what does making sure cost?

Drag Buyers reaching for each vada to 12, switch between Hold the tray and Check the count again, and watch Time to an answer.

Open The last vada →

Related paper

Review System Design →

Saved in this browser, and to your account when you sign in.