Rename book to Process Control
This commit is contained in:
1 parent
919e79eb2a
commit
afb816f459
53 files changed
+5587
-503
No files matched your search
@@ -7,7 +7,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
|
||||
|
||||
<title>3 Teil II — Die Prozessgrenze überschreiten – Vom Aufruf zum Ereignis</title>
|
||||
<title>3 Teil II — Die Prozessgrenze überschreiten – Prozesssteuerung</title>
|
||||
<style>
|
||||
/* Default styles provided by pandoc.
|
||||
** See https://pandoc.org/MANUAL.html#variables-for-html for config info.
|
||||
@@ -71,6 +71,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
|
||||
<script src="site_libs/quarto-search/fuse.min.js"></script>
|
||||
<script src="site_libs/quarto-search/quarto-search.js"></script>
|
||||
<meta name="quarto:offset" content="./">
|
||||
<link href="./glossary.html" rel="next">
|
||||
<link href="./01-part-i-calls.html" rel="prev">
|
||||
<script src="site_libs/quarto-html/quarto.js" type="module"></script>
|
||||
<script src="site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
|
||||
@@ -84,9 +85,15 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
|
||||
<link href="site_libs/bootstrap/bootstrap-cfe7114cbc4adb2af5ff3a891545d7fa.min.css" rel="stylesheet" append-hash="true" id="quarto-bootstrap" data-mode="light">
|
||||
<script src="site_libs/quarto-contrib/calc-exo-2.0.0/exo.js"></script>
|
||||
<link href="site_libs/quarto-contrib/calc-exo-2.0.0/exo.css" rel="stylesheet">
|
||||
<script src="site_libs/quarto-contrib/calc-quiz-1.0.0/quiz.js"></script>
|
||||
<link href="site_libs/quarto-contrib/calc-quiz-1.0.0/quiz.css" rel="stylesheet">
|
||||
<link href="site_libs/quarto-contrib/calc-further-1.0.0/further.css" rel="stylesheet">
|
||||
<link href="site_libs/quarto-contrib/calc-latex-tables-1.0.0/latex-tables.css" rel="stylesheet">
|
||||
<script src="site_libs/quarto-contrib/calc-notes-1.0.0/calc-notes.js"></script>
|
||||
<link href="site_libs/quarto-contrib/calc-notes-1.0.0/theme.css" rel="stylesheet">
|
||||
<link href="site_libs/quarto-contrib/calc-notes-1.0.0/high-contrast.css" rel="stylesheet">
|
||||
<link href="site_libs/quarto-contrib/calc-notes-1.0.0/calc-notes.css" rel="stylesheet">
|
||||
<link href="site_libs/quarto-contrib/calc-notes-1.0.0/narrow.css" rel="stylesheet">
|
||||
<script src="site_libs/quarto-contrib/calc-glossary-2.0.0/glossary.js"></script>
|
||||
<link href="site_libs/quarto-contrib/calc-glossary-2.0.0/glossary.css" rel="stylesheet">
|
||||
<script id="quarto-search-options" type="application/json">{
|
||||
@@ -129,7 +136,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
|
||||
nothing is attached to the links themselves: one capture-phase listener on
|
||||
the document reads the link's final address at click time.
|
||||
|
||||
If a language has not been built (./render-all.sh), its pages do not exist:
|
||||
If a language has not been built, its pages do not exist:
|
||||
the target is checked first and a short note is shown instead of a
|
||||
"Not Found" page.
|
||||
|
||||
@@ -145,12 +152,9 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
|
||||
var ROOT_LANG = 'en'; // the language at the top of _book/
|
||||
var COOKIE = 'notes-lang';
|
||||
var NOTE = {
|
||||
de: 'Diese Sprache wurde noch nicht erstellt. Einmal ./render-all.sh ausführen – '
|
||||
+ 'danach funktioniert der Wechsel auch in der Vorschau.',
|
||||
fr: 'Cette langue n’a pas encore été générée. Lancez une fois ./render-all.sh : '
|
||||
+ 'ensuite le changement fonctionne aussi dans l’aperçu.',
|
||||
en: 'This language hasn’t been built yet. Run ./render-all.sh once, '
|
||||
+ 'then switching works in the preview too.'
|
||||
de: 'Diese Sprache ist hier noch nicht verfügbar.',
|
||||
fr: 'Cette langue n’est pas encore disponible ici.',
|
||||
en: 'This language is not available here yet.'
|
||||
};
|
||||
|
||||
var here = (document.documentElement.lang || ROOT_LANG).slice(0, 2);
|
||||
@@ -164,9 +168,20 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
|
||||
var m = document.cookie.match(/(?:^|;\s*)notes-lang=(de|fr|en)(?:;|$)/);
|
||||
return m ? m[1] : null;
|
||||
}
|
||||
// path '/' on purpose: every book of these notes is served from one host,
|
||||
// each under its own folder, so a language picked in any of them is the
|
||||
// language all of them open in. A book hosted on its own would be no worse
|
||||
// off -- the cookie simply has nothing else to reach.
|
||||
var COOKIE_PATH = '/';
|
||||
function remember(code) {
|
||||
document.cookie = COOKIE + '=' + code + '; path=' + root + '; max-age=31536000; SameSite=Lax'
|
||||
document.cookie = COOKIE + '=' + code + '; path=' + COOKIE_PATH
|
||||
+ '; max-age=31536000; SameSite=Lax'
|
||||
+ (location.protocol === 'https:' ? '; Secure' : '');
|
||||
// a copy written under the book's own path by an earlier version would be
|
||||
// the more specific one and would shadow the shared cookie for good
|
||||
if (root !== COOKIE_PATH) {
|
||||
document.cookie = COOKIE + '=; path=' + root + '; max-age=0';
|
||||
}
|
||||
}
|
||||
|
||||
// a returning reader lands in the language picked last time
|
||||
@@ -188,7 +203,11 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
|
||||
box.style.cssText = 'position:fixed;left:50%;bottom:1.25rem;transform:translateX(-50%);'
|
||||
+ 'max-width:min(34rem,calc(100vw - 2rem));padding:.6rem .9rem;border-radius:6px;'
|
||||
+ 'background:#1f2328;color:#fff;font-size:.85rem;line-height:1.4;z-index:2000;'
|
||||
+ 'box-shadow:0 4px 16px rgba(0,0,0,.25)';
|
||||
// a status message, so it keeps its own dark surface in either mode; the
|
||||
// hairline is the page's rule colour, invisible on a light page and an
|
||||
// edge against a dark one, where the shadow alone no longer separates it
|
||||
+ 'border:1px solid var(--calc-line,#444);'
|
||||
+ 'box-shadow:0 4px 16px var(--calc-shadow,rgba(0,0,0,.25))';
|
||||
document.body.appendChild(box);
|
||||
setTimeout(function () { box.remove(); }, 7000);
|
||||
}
|
||||
@@ -229,7 +248,35 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
|
||||
}, true);
|
||||
})();
|
||||
</script>
|
||||
<style>:root { --calc-notecolor: #B45309; }</style>
|
||||
<style>:root {
|
||||
--calc-furthercolor-src: #6B3FA0;
|
||||
--calc-furthercolor: var(--calc-furthercolor-src);
|
||||
|
||||
}</style>
|
||||
<style>:root {
|
||||
--calc-notecolor-src: #B45309;
|
||||
--calc-notecolor: var(--calc-notecolor-src);
|
||||
|
||||
}</style>
|
||||
<script>(function (e) {
|
||||
var KEY = 'notes-contrast', forced = false;
|
||||
var picked = null;
|
||||
try { picked = localStorage.getItem(KEY); } catch (err) {}
|
||||
var q = null;
|
||||
try { q = window.matchMedia && window.matchMedia('(prefers-contrast: more)'); } catch (err) {}
|
||||
if (picked === 'more' || (picked !== 'normal' && (forced || (q && q.matches)))) {
|
||||
e.classList.add('hc');
|
||||
}
|
||||
if (q) {
|
||||
var f = function () {
|
||||
var p = null;
|
||||
try { p = localStorage.getItem(KEY); } catch (err) {}
|
||||
if (p === null) e.classList.toggle('hc', forced || q.matches);
|
||||
};
|
||||
if (q.addEventListener) q.addEventListener('change', f);
|
||||
else if (q.addListener) q.addListener(f);
|
||||
}
|
||||
})(document.documentElement);</script>
|
||||
|
||||
|
||||
</head>
|
||||
@@ -258,7 +305,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
|
||||
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
|
||||
<div class="pt-lg-2 mt-2 text-left sidebar-header">
|
||||
<div class="sidebar-title mb-0 py-0">
|
||||
<a href="./">Vom Aufruf zum Ereignis</a>
|
||||
<a href="./">Prozesssteuerung</a>
|
||||
<div class="sidebar-tools-main tools-wide">
|
||||
<div class="dropdown">
|
||||
<a href="" title="" id="quarto-navigation-tool-dropdown-0" class="quarto-navigation-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false" role="link" aria-label=""><i class="bi bi-translate"></i></a>
|
||||
@@ -280,7 +327,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a href="./Vom-Aufruf-zum-Ereignis.pdf" title="Download PDF" class="quarto-navigation-tool px-1" aria-label="Download PDF"><i class="bi bi-file-pdf"></i></a>
|
||||
<a href="./Prozesssteuerung.pdf" title="Download PDF" class="quarto-navigation-tool px-1" aria-label="Download PDF"><i class="bi bi-file-pdf"></i></a>
|
||||
<a href="" class="quarto-reader-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleReader(); return false;" title="Lesemodus umschalten">
|
||||
<div class="quarto-reader-toggle-btn">
|
||||
<i class="bi"></i>
|
||||
@@ -305,7 +352,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
|
||||
<li class="sidebar-item">
|
||||
<div class="sidebar-item-container">
|
||||
<a href="./00-orientation.html" class="sidebar-item-text sidebar-link">
|
||||
<span class="menu-text"><span class="chapter-number">1</span> <span class="chapter-title">Schritt 0 — Worum es im Tutorial geht</span></span></a>
|
||||
<span class="menu-text"><span class="chapter-number">1</span> <span class="chapter-title">Schritt 0 — Worum es geht</span></span></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="sidebar-item">
|
||||
@@ -320,6 +367,23 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
|
||||
<span class="menu-text"><span class="chapter-number">3</span> <span class="chapter-title">Teil II — Die Prozessgrenze überschreiten</span></span></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="sidebar-item sidebar-item-section">
|
||||
<div class="sidebar-item-container">
|
||||
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" role="navigation" aria-expanded="false">
|
||||
<span class="menu-text">Anhang</span></a>
|
||||
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" role="navigation" aria-expanded="false" aria-label="Abschnitt umschalten">
|
||||
<i class="bi bi-chevron-right ms-2"></i>
|
||||
</a>
|
||||
</div>
|
||||
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 ">
|
||||
<li class="sidebar-item">
|
||||
<div class="sidebar-item-container">
|
||||
<a href="./glossary.html" class="sidebar-item-text sidebar-link">
|
||||
<span class="menu-text">Glossar</span></a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -367,7 +431,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
|
||||
<section id="sec-step-11" class="level2" data-number="3.1">
|
||||
<h2 data-number="3.1" class="anchored" data-anchor-id="sec-step-11"><span class="header-section-number">3.1</span> Schritt 11 — Die Komponenten trennen</h2>
|
||||
<p>Drei Prozesse können keine <code>BlockingQueue</code> teilen: jeder <code>java</code>-Befehl startet seine eigene JVM mit eigenem Speicher, die <code>mailboxes</code>-Map existierte also dreimal, und jede Kopie sähe nur ihre eigenen Nachrichten. Ein externer Transport ist nötig.</p>
|
||||
<p>TCP würde gehen, MQTT würde gehen. Das Tutorial wählt absichtlich die primitivste Möglichkeit, das <strong>Dateisystem</strong>, mit einer einzeiligen Begründung: <em>weil man es sehen kann</em>. Nachrichten werden Dateien, die man mit <code>ls</code> auflisten und mit <code>cat</code> lesen kann, während das System läuft. Primitiv heisst hier nicht schlechter; Teil VIII kommt darauf zurück, was das Dateisystem wirklich gut und wirklich schlecht kann.</p>
|
||||
<p>TCP würde gehen, MQTT würde gehen. Absichtlich fällt die Wahl auf die primitivste Möglichkeit, das <strong>Dateisystem</strong>, mit einer einzeiligen Begründung: <em>weil man es sehen kann</em>. Nachrichten werden Dateien, die man mit <code>ls</code> auflisten und mit <code>cat</code> lesen kann, während das System läuft. Primitiv heisst hier nicht schlechter; Teil VIII kommt darauf zurück, was das Dateisystem wirklich gut und wirklich schlecht kann.</p>
|
||||
</section>
|
||||
<section id="sec-steps-12-13" class="level2" data-number="3.2">
|
||||
<h2 data-number="3.2" class="anchored" data-anchor-id="sec-steps-12-13"><span class="header-section-number">3.2</span> Schritte 12–13 — Ein Verzeichnis wird zum Postfach</h2>
|
||||
@@ -410,7 +474,7 @@ TIMESTAMP: 2026-09-22T10:42:12.123Z</code></pre>
|
||||
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="bu">printf</span> <span class="st">'TEXT\nHello from a file'</span> <span class="op">></span> messageBoard/consoleOut/inbox/manual.tmp</span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="fu">mv</span> messageBoard/consoleOut/inbox/manual.tmp messageBoard/consoleOut/inbox/manual.msg</span></code></pre></div><button title="In die Zwischenablage kopieren" class="code-copy-button"><i class="bi"></i></button></div>
|
||||
<p><strong>Beobachtet:</strong> beim Auftauchen der <code>.tmp</code>-Datei geschieht nichts; die Zeile erscheint in dem Moment, in dem das Umbenennen den <code>.msg</code>-Namen erzeugt. Beide erlaubten Formate funktionieren, mit und ohne abschliessenden Zeitstempel.</p>
|
||||
<p>Die architektonische Lehre ist die, die das Tutorial als <code>producer → filesystem → consumer</code> zieht: der Konsument konnte einen Menschen, der <code>mv</code> tippt, nicht von einem echten Dienst unterscheiden. Er kennt sein eigenes Eingangspostfach, nicht den, der hineinschreibt. Der Egoismus hat die Prozessgrenze überlebt.</p>
|
||||
<p>Die architektonische Lehre lautet <code>producer → filesystem → consumer</code>: der Konsument konnte einen Menschen, der <code>mv</code> tippt, nicht von einem echten Dienst unterscheiden. Er kennt sein eigenes Eingangspostfach, nicht den, der hineinschreibt. Der Egoismus hat die Prozessgrenze überlebt.</p>
|
||||
</section>
|
||||
<section id="sec-steps-16-17" class="level2" data-number="3.5">
|
||||
<h2 data-number="3.5" class="anchored" data-anchor-id="sec-steps-16-17"><span class="header-section-number">3.5</span> Schritte 16–17 — Dienste und Vermittler werden Prozesse</h2>
|
||||
@@ -457,8 +521,8 @@ TIMESTAMP: 2026-09-22T10:42:12.123Z</code></pre>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Der Vermittler ist generisch: seine Route ist nicht einkompiliert, sie kommt als zwei Startargumente. Doch das Tutorial weist auf eine Asymmetrie hin, die man im Kopf behalten sollte: die drei Fähigkeiten erhalten ihre <strong>Arbeit</strong> als Nachrichten in einem Postfach, der Vermittler dagegen seine <strong>Route</strong> als Startkonfiguration — und er hat keinen Namen und kein eigenes Steuerpostfach, in das jemand schreiben könnte.</p>
|
||||
<p>Praktische Folge: Argumente werden einmal gelesen, das Ändern der Route eines laufenden Vermittlers heisst also: anhalten und neu starten. Eine Konfigurationsdatei wäre nicht anders — auch sie wird beim Start gelesen. Das Tutorial lässt diesen Punkt absichtlich offen, bis die Kosten der verteilten Vermittler zu spüren waren.</p>
|
||||
<p>Der Vermittler ist generisch: seine Route ist nicht einkompiliert, sie kommt als zwei Startargumente. Doch eine Asymmetrie sollte man im Kopf behalten: die drei Fähigkeiten erhalten ihre <strong>Arbeit</strong> als Nachrichten in einem Postfach, der Vermittler dagegen seine <strong>Route</strong> als Startkonfiguration — und er hat keinen Namen und kein eigenes Steuerpostfach, in das jemand schreiben könnte.</p>
|
||||
<p>Praktische Folge: Argumente werden einmal gelesen, das Ändern der Route eines laufenden Vermittlers heisst also: anhalten und neu starten. Eine Konfigurationsdatei wäre nicht anders — auch sie wird beim Start gelesen. Dieser Punkt bleibt absichtlich offen, bis die Kosten der verteilten Vermittler zu spüren waren.</p>
|
||||
</section>
|
||||
<section id="sec-step-18" class="level2" data-number="3.6">
|
||||
<h2 data-number="3.6" class="anchored" data-anchor-id="sec-step-18"><span class="header-section-number">3.6</span> Schritt 18 — Die vollständig externe lokale Fassung ausführen</h2>
|
||||
@@ -469,7 +533,7 @@ TIMESTAMP: 2026-09-22T10:42:12.123Z</code></pre>
|
||||
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="ex">java</span> Mediator.java rot13/outbox consoleOut/inbox <span class="co"># terminal 4</span></span>
|
||||
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="ex">java</span> ActuatorService.java <span class="co"># terminal 5</span></span></code></pre></div><button title="In die Zwischenablage kopieren" class="code-copy-button"><i class="bi"></i></button></div>
|
||||
<p><strong>Beobachtet:</strong> <code>Hello World</code>, in Terminal 1 getippt, erschien als <code>Uryyb Jbeyq</code> in Terminal 5. Die drei mittleren Terminals zeigten nichts Neues — jeder Vermittler gibt beim Start eine Zeile „Mediating: …” aus, und <code>ProcessorService</code> gibt überhaupt nichts aus. Danach enthielt jedes der vier Postfachverzeichnisse eine <code>.msg</code>-Datei: dieselbe Zeile, entlang der Kette kopiert.</p>
|
||||
<p>Nachzählen: <strong>fünf Prozesse</strong> für das, was Schritt 1 in einer Anweisung tat. Die Anweisung des Tutorials an dieser Stelle lautet nicht, zu optimieren: „We are not done making it painful.”</p>
|
||||
<p>Nachzählen: <strong>fünf Prozesse</strong> für das, was Schritt 1 in einer Anweisung tat. Jetzt ist nicht der Moment zu optimieren: bequem soll es noch nicht sein.</p>
|
||||
<div id="fig-filesystem-processes" class="flow-figure quarto-float quarto-figure quarto-figure-center anchored">
|
||||
<figure class="quarto-float quarto-float-fig figure">
|
||||
<div aria-describedby="fig-filesystem-processes-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
|
||||
@@ -1146,6 +1210,9 @@ Abbildung 3.1: Die fünf Prozesse und die vier Postfachverzeichnisse. In de
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-page nav-page-next">
|
||||
<a href="./glossary.html" class="pagination-link" aria-label="[Glossary]{.en}[Glossaire]{.fr}[Glossar]{.de}">
|
||||
<span class="nav-page-text">Glossar</span> <i class="bi bi-arrow-right-short"></i>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div> <!-- /content -->
|
||||
|
||||
Reference in new issue
Block a user