Files
ProcessControl/_book/de/figures/filesystem-processes-de.svg
2026-10-16 09:05:43 +02:00

200 lines
11 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 620 750" width="620" height="750"
role="img" aria-labelledby="fp-title">
<title id="fp-title">Dieselbe Kette als fünf getrennte Prozesse auf einem Rechner: SensorService veröffentlicht eine .msg-Datei in consoleIn/outbox, ein Mediator-Prozess beobachtet dieses Verzeichnis und veröffentlicht eine Kopie in rot13/inbox, ProcessorService veröffentlicht sein Ergebnis in rot13/outbox, ein zweiter Mediator-Prozess verschiebt es nach consoleOut/inbox, und ActuatorService gibt es aus. Die vier Verzeichnisse bilden das Nachrichtenbrett auf einem lokalen Dateisystem.</title>
<style><![CDATA[
/* figures/diagram.css -- shared look of every built figure.
*
* build-figures.py drops this file into the style element of every built
* svg, so a figure carries its own styling and stays self-contained.
* Classes, not per-element fills, do the work: one edit here restyles the
* whole book.
*
* Colours are the extension's tokens (_extensions/notes/theme.css) with a
* literal fallback, which covers all three ways a figure is seen:
*
* - inlined into the page by figures/flow-player.html: the tokens resolve
* against the page, so the figure follows light, night and high contrast;
* - as a plain <img> (JavaScript off): the fallback applies, and night mode
* comes from the extension's invert filter on main img[src$=".svg"];
* - in the pdf: librsvg ignores var() and uses the fallback, so print gets
* the light palette -- which is what a printed page wants.
*
* The fallbacks are this book's own light values; the tokens carry the night
* and high-contrast ones. Nothing here keys off prefers-color-scheme: the
* page's toggle decides, never the reader's system setting.
*/
svg {
font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
/* the figure sits on the page, not on a white card of its own */
background: transparent;
}
/* ---- surfaces ------------------------------------------------------- */
.box { fill: var(--calc-faint, #eef3f7); stroke: var(--calc-notecolor, #20666f); stroke-width: 1.4; }
.box-weak { fill: var(--calc-faint, #eef3f7); stroke: var(--calc-notecolor, #20666f); stroke-width: 1.4; }
.box-accent { fill: var(--calc-faint, #e5eff1); stroke: var(--calc-notecolor, #20666f); stroke-width: 1.8; }
.box-warn { fill: var(--calc-faint, #f8f1e0); stroke: var(--calc-accent-b, #D1541F); stroke-width: 1.4; }
.box-plain { fill: var(--calc-surface, #fbfcfd); stroke: var(--calc-grid, #dae0e8); stroke-width: 1.2; }
.diamond { fill: var(--calc-faint, #e5eff1); stroke: var(--calc-notecolor, #20666f); stroke-width: 1.4; }
.ellipse { fill: var(--calc-surface, #fbfcfd); stroke: var(--calc-muted, #5a6879); stroke-width: 1.2; }
/* ---- lines ---------------------------------------------------------- */
.edge { fill: none; stroke: var(--calc-muted, #5a6879); stroke-width: 1.3; }
.edge-strong{ fill: none; stroke: var(--calc-notecolor, #20666f); stroke-width: 1.8; }
.edge-warn { fill: none; stroke: var(--calc-accent-b, #D1541F); stroke-width: 1.6; }
.edge-dash { fill: none; stroke: var(--calc-muted, #5a6879); stroke-width: 1.2; stroke-dasharray: 5 3; }
.rule { stroke: var(--calc-grid, #dae0e8); stroke-width: 1; }
/* ---- text ----------------------------------------------------------- */
.t { fill: var(--calc-ink, #1b2430); font-size: 13px; }
.t-sm { fill: var(--calc-ink, #1b2430); font-size: 11px; }
.t-lead { fill: var(--calc-ink, #1b2430); font-size: 14px; font-weight: 600; }
.t-mut { fill: var(--calc-muted, #5a6879); font-size: 11px; }
.t-key { fill: var(--calc-ink, #1b2430); font-size: 12px; text-decoration: underline; }
.t-accent { fill: var(--calc-notecolor, #20666f); font-size: 12px; font-weight: 600; }
.t-warn { fill: var(--calc-accent-b, #D1541F); font-size: 12px; font-weight: 600; }
.t-mono { fill: var(--calc-ink, #1b2430); font-size: 11.5px;
font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; }
.mid { text-anchor: middle; }
.end { text-anchor: end; }
/* ---- interaction ====================================================
* A .node groups one box with its labels. Hovering it lifts the whole group
* a little, which is enough to follow a path through a busy diagram without
* any script. Pointer events stay off the decorative layers so the hover
* target is the shape itself.
*/
.node { transition: opacity .12s ease; }
.node:hover .box,
.node:hover .box-accent,
.node:hover .diamond { stroke-width: 2.6; }
.node:hover .t, .node:hover .t-lead { fill: var(--calc-notecolor, #20666f); }
svg:hover .node:not(:hover) { opacity: .55; }
/* a figure that marks no nodes must not dim on hover */
svg:not(:has(.node)) .node { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
.node { transition: none; }
}
/* ---- arrowheads ======================================================
* marker contents cannot inherit the referencing element's fill, so each
* arrowhead is its own class and is themed alongside the line it ends.
*/
.arrow { fill: var(--calc-muted, #5a6879); }
.arrow-strong { fill: var(--calc-notecolor, #20666f); }
.arrow-warn { fill: var(--calc-accent-b, #D1541F); }
]]>
[data-label="mediator1"] { font-size: 11px; }
[data-label="mediator2"] { font-size: 11px; }</style>
<defs>
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5"
markerWidth="6.5" markerHeight="6.5" orient="auto-start-reverse">
<path class="arrow" d="M0,0 L10,5 L0,10 z"/>
</marker>
</defs>
<!-- 1. SensorService (terminal 1) ==================================== -->
<g class="node" data-flow-node="sensor">
<rect class="box" x="120" y="24" width="300" height="46" rx="3"/>
<text class="t-lead mid" data-label="sensor" x="270" y="46">SensorService — ConsoleIn</text>
<text class="t-mut mid" data-label="t1" x="270" y="62">Terminal 1</text>
</g>
<path class="edge" data-flow="1" data-flow-to="outbox1" d="M270,70 V96" marker-end="url(#a)"/>
<text class="t-accent" data-label="publish1" x="286" y="88">veröffentlichen (.tmp → .msg)</text>
<!-- 2. consoleIn/outbox ============================================= -->
<g class="node" data-flow-node="outbox1">
<rect class="box-plain" x="120" y="98" width="300" height="44" rx="3"/>
<text class="t-mono mid" x="270" y="126">consoleIn/outbox/*.msg</text>
</g>
<path class="edge" data-flow="2" data-flow-to="mediator1" d="M270,142 V168" marker-end="url(#a)"/>
<text class="t-accent" data-label="watch1" x="286" y="160">WatchService</text>
<!-- 3. first mediator process (terminal 2) =========================== -->
<g class="node" data-flow-node="mediator1">
<rect class="box-accent" x="120" y="170" width="300" height="46" rx="3"/>
<text class="t-lead mid" data-label="mediator1" x="270" y="192">Mediator.java consoleIn/outbox rot13/inbox</text>
<text class="t-mut mid" data-label="t2" x="270" y="208">Terminal 2</text>
</g>
<path class="edge" data-flow="3" data-flow-to="inbox2" d="M270,216 V242" marker-end="url(#a)"/>
<text class="t-accent" data-label="publish2" x="286" y="234">veröffentlichen</text>
<!-- 4. rot13/inbox =================================================== -->
<g class="node" data-flow-node="inbox2">
<rect class="box-plain" x="120" y="244" width="300" height="44" rx="3"/>
<text class="t-mono mid" x="270" y="272">rot13/inbox/*.msg</text>
</g>
<path class="edge" data-flow="4" data-flow-to="processor" d="M270,288 V314" marker-end="url(#a)"/>
<text class="t-accent" data-label="watch2" x="286" y="306">WatchService</text>
<!-- 5. ProcessorService (terminal 3) ================================= -->
<g class="node" data-flow-node="processor">
<rect class="box" x="120" y="316" width="300" height="46" rx="3"/>
<text class="t-lead mid" data-label="processor" x="270" y="338">ProcessorService — ROT13</text>
<text class="t-mut mid" data-label="t3" x="270" y="354">Terminal 3</text>
</g>
<path class="edge" data-flow="5" data-flow-to="outbox2" d="M270,362 V388" marker-end="url(#a)"/>
<text class="t-accent" data-label="publish3" x="286" y="380">veröffentlichen</text>
<!-- 6. rot13/outbox ================================================== -->
<g class="node" data-flow-node="outbox2">
<rect class="box-plain" x="120" y="390" width="300" height="44" rx="3"/>
<text class="t-mono mid" x="270" y="418">rot13/outbox/*.msg</text>
</g>
<path class="edge" data-flow="6" data-flow-to="mediator2" d="M270,434 V460" marker-end="url(#a)"/>
<text class="t-accent" data-label="watch3" x="286" y="452">WatchService</text>
<!-- 7. second mediator process (terminal 4) ========================== -->
<g class="node" data-flow-node="mediator2">
<rect class="box-accent" x="120" y="462" width="300" height="46" rx="3"/>
<text class="t-lead mid" data-label="mediator2" x="270" y="484">Mediator.java rot13/outbox consoleOut/inbox</text>
<text class="t-mut mid" data-label="t4" x="270" y="500">Terminal 4</text>
</g>
<path class="edge" data-flow="7" data-flow-to="inbox3" d="M270,508 V534" marker-end="url(#a)"/>
<text class="t-accent" data-label="publish4" x="286" y="526">veröffentlichen</text>
<!-- 8. consoleOut/inbox ============================================== -->
<g class="node" data-flow-node="inbox3">
<rect class="box-plain" x="120" y="536" width="300" height="44" rx="3"/>
<text class="t-mono mid" x="270" y="564">consoleOut/inbox/*.msg</text>
</g>
<path class="edge" data-flow="8" data-flow-to="actuator" d="M270,580 V606" marker-end="url(#a)"/>
<text class="t-accent" data-label="watch4" x="286" y="598">WatchService</text>
<!-- 9. ActuatorService (terminal 5) ================================== -->
<g class="node" data-flow-node="actuator">
<rect class="box" x="120" y="608" width="300" height="46" rx="3"/>
<text class="t-lead mid" data-label="actuator" x="270" y="630">ActuatorService — ConsoleOut</text>
<text class="t-mut mid" data-label="t5" x="270" y="646">Terminal 5</text>
</g>
<!-- the four directories belong to one message board on one filesystem -->
<path class="edge-dash" d="M436,98 H452 V580 H436"/>
<text class="t-mono" x="460" y="330">messageBoard/</text>
<!-- two lines: one line of this label ran past the 620-wide viewBox in
German and French, where an svg root clips rather than overflows =
a truncated label at phone width. -->
<text class="t-mut" data-label="board" x="460" y="348">Verzeichnis = Postfach</text>
<text class="t-mut" data-label="board2" x="460" y="363">Datei = Nachricht</text>
<!-- the five processes are started by hand, one terminal each -->
<path class="edge-dash" d="M104,24 H88 V654 H104"/>
<!-- three lines: one ran well past the viewBox in every language, and an
svg root clips rather than overflows. -->
<text class="t-warn" data-label="topology" x="14" y="700">Fünf von Hand gestartete Prozesse.</text>
<text class="t-warn" data-label="topology2" x="14" y="716">Die Topologie steckt nun in den zwei Mediator-Befehlszeilen —</text>
<text class="t-warn" data-label="topology3" x="14" y="732">bei dem, der sie getippt hat.</text>
</svg>