A System Design in Forty Minutes
Where Each of the Forty Minutes Goes, and the Two Mistakes That Cost Ten
Last timeThe Drawing You Can Defend
The forty minutes divided into seven stages with the number that has to leave each one, the two mistakes that cost the most minutes, and a second brief run end to end at that pace.
Forty minutes is enough time to do this properly once and not enough to do it
twice. So the only interesting question about the clock is where the minutes
go, and the answer is not even across the stages. The arithmetic gets more time
than the drawing, which reads as the wrong way round until you notice that the
drawing is a transcription of decisions the arithmetic already made.
The seven stages, as minutes
Five minutes on scope, seven on the arithmetic, five on the one machine
version, ten on the reads and the writes together, five on what a reader sees
during a failure, five on the drawing and its defence, and three held back.
That is .
Two of those allocations are worth arguing about. The arithmetic gets seven
minutes, more than the drawing, because an estimate skipped at minute ten is
paid for at minute thirty when a box has no number behind it. The reads and
writes get ten minutes between them, a quarter of the whole budget, because
that is where the components actually come from and where the only genuinely
difficult decision of the hour lives, which is the key the data is split by.
The three minutes of slack are not spare. They are for the question that
follows the drawing, and the question is almost always what happens if one of
the estimates is ten times larger.
What has to leave each stage
A stage is finished when a particular artefact exists, not when the time runs
out. Scope leaves one sentence the design has to satisfy, plus two or three
named operations with their shapes. The arithmetic leaves three numbers,
requests a second, bytes stored, and the read to write ratio. The one machine
version leaves two multiples, the factor by which requests exceed one machine
and the factor by which bytes exceed one disk. Reads and writes leave a key, a
hit rate and a machine count. The failure stage leaves two sentences, each of
the form that during a failure a reader sees this rather than that. The drawing
stage leaves the drawing and four or five defences of the form that this box
meets this demand because one machine supplies that much.
The symptom of a stage that ended without its artefact is audible. The first
sentence of the next stage contains the word probably. Hearing yourself say it
is the cheapest signal available, and the correct response is to go back one
stage and do the division that was skipped, which costs under a minute at that
point and about five if it is discovered at the drawing.
The lesson stops here
5 more paragraphs to go
You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.
The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.
See the planThe contentsThis is the reading half
Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.
The contents