Basis Lab

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.

FIG 1Forty minutes, divided
scope and the operationsthe arithmeticthe one machine versionthe reads and the writeswhat a failure looks likethe drawing and its defenceslack01020304012every number exists by here27the design is decided by hereminutes on the clock
The two marks are the ones to watch rather than the boundaries. Arriving at minute twelve without numbers means the next fifteen minutes are guesses, and arriving at minute twenty-seven without a decided design means the drawing will be made up while it is being drawn.

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 5+7+5+10+5+5+3=405 + 7 + 5 + 10 + 5 + 5 + 3 = 40.

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 contents

This 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

The rest of this course

  1. 01What a One Line Design Request Actually Asks For
  2. 02Estimating the Load Before You Draw Anythingopening only
  3. 03The One Machine Version, and the Number at Which It Breaksopening only
  4. 04Where 360,000 Reads a Second Actually Goopening only
  5. 05Splitting the Writes, and the Number That Decides How Many Piecesopening only
  6. 06What a Reader Sees While Something Is Brokenopening only
  7. 07Justifying Every Box in the Drawing With the Number That Forced Itopening only
  8. 08Where Each of the Forty Minutes Goes, and the Two Mistakes That Cost Tenyou are here

Read alongside