Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 02 · System Design · When the stalls must agree · about 21 min to read

Watch: Event-driven architecture: the ledger everyone reads
▶ VideoPlay it as a journeyTutor comes with a plan

The Ledger Everyone Reads (event-driven & the log)

The Ledger Everyone Reads
The Ledger Everyone Reads · Open board

The chai stall’s order-slip rail (The order slip rail (queues & the utilization cliff)) grown up. There, one boy handed slips to one kitchen. Here four people all need the same order, and the rail becomes a book on the counter that nobody is allowed to erase.

Before you start. You need the order-slip rail from The order slip rail (queues & the utilization cliff): the order goes on a spike, the kitchen takes the next slip whenever it is free, and the customer walks away instead of standing there. That is one writer and one reader, and it works. The only thing this lesson changes is how many people want to read.

Lesson 11 of 115 in System Design

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 2010: four people need the same order, so the boy runs four errands
  • The fix: write it down once, and a line in the book is an event
  • The bookmark: each reader is a consumer, and owns its offset
  • 2011: Kafka, named for a writer
  • The bill: lag, and the reader answering from an old page
  • Lag, computed
  • The two harder jobs: event sourcing and change data capture
  • The rest of the bill

Terms it explains: event, log, consumer, offset, lag, topic, publishing, subscribing, retention, partitions, 8,000 events a second, 6,500 a second, Sizing the partitions, Event sourcing, Change data capture.

Lab

The same answer is correct under one promise and a violation under another. Which promise did you make?

Drag Moments the boards run behind the ledger to 3, press Play next moment through the evening, and watch promises broken.

Open The ledger everyone reads

Every sale goes in the register and must also reach the warehouse. The app crashes now and then. Which design lets the two disagree?

Drag How often the app crashes, then switch the tab to Write once, copy from the diary, and watch Do the two agree.

Open The write that happened twice

Related papers

Review System Design