Reading diagrams / Topic 19 of 42
A system map: the wall and its places
The rule
The layer diagram showed what is built from what. The system map answers a different question: what kind of program is this, and what does it do to the world? It draws the whole program as one picture.
The thick black frame is the program's wall. Left of the wall stand its callers: a screen for programs that call it over HTTP, a page for programs that link it and call its definitions. A bracket joins each caller to the openings it calls. Each opening in the wall is one entry: a route of a service, or an exported definition of a library. A library's opening carries a small arrowhead: pointing in for a definition a caller calls, pointing out for a value the library hands out. Right of the wall is the rack: a database, a language model and the network, always in that order.
Every part of the map has a fixed place. If the program has a thing, it is drawn at its place; if it does not, the place stays empty, or for callers and the rack, the glyph is drawn struck through. So an empty place is an answer, not a gap in the picture.
A library with many exports draws a few openings by name and gathers the rest under +n at the bottom of the wall. Those are openings too: koa's one named opening and its “+12” make thirteen.
The pictures also carry marks that later lessons teach one at a time: rings, red diamonds, purple hulls, small dots, loop arrows and the blue rail. For now, read only the places: callers, openings and the rack. The map draws what the program is, not what it is for. A route called /notes might store anything; names are not evidence.
- A plain glyph confirms that kind of caller or resource; a struck glyph rules it out.
- Count openings to count entries, including the number after +.
- What the program is for: the map can't tell.
notes-api: a small service that keeps notes in one table.
Loading the system map.
koa: a small copy of the Koa web framework, used as a library.
Loading the system map.
How to read this: what each mark in these pictures means
Loading the worked examples and practice.