Reading diagrams / Topic 28 of 42

Engines: lanes and wires

The rule

An engine is the code that performs the program's requests and hands the replies back, round after round. Each engine is a lane to the right of the program box, numbered from 1. The caption under each lane's loop starts with the same number, the engine's package, and what it takes and gives back: “1 Desk: Brief, List[Exchange], List[()] → List[Exchange]”. When two lanes come from one package, each is named by package and definition, as Icetakes' lanes are in the next topic. When there is room, the package and what it takes stand above the lane instead of the number.

A wire runs from each opening to every lane that performs it. Where it meets the lane, the resources it reaches there are written over the wire, or drawn as one dot each in the colour of that resource's pill under the lane, such as db, model or net. The pills at the foot of a lane name every resource it reaches. An opening struck through, with a red slash and no wire, is a request the program can make and no engine performs.

The green bar in the program and the grey bar at the top of each lane count decisions: the branches each one takes. More decisions, longer bar, with the number and the word “decisions” beside it; where a lane has no room for the word, its loop caption says “decisions of its own” after the number. A long program bar beside short engine bars means the rules sit in the step, where they can be tested without the world. When two bars look close, compare the numbers beside them.

review-desk.

Loading the system map.

problemsapi, with two engines.

Loading the system map.

Loading the worked examples and practice.