105 lines
5.9 KiB
Plaintext
105 lines
5.9 KiB
Plaintext
# [Step 0 — What the tutorial is about]{.en}[Étape 0 — De quoi parle le tutoriel]{.fr}[Schritt 0 — Worum es im Tutorial geht]{.de} {#sec-step-0}
|
|
|
|
<!-- MULTILINGUAL: see the comment at the top of index.qmd. -->
|
|
|
|
::: {.en}
|
|
Step 0 contains no code. It states the subject: not ROT13, but the architecture around it. The functionality stays almost unchanged for 81 steps, which is what makes the changes around it visible.
|
|
|
|
Two rules are set here and hold for the whole tutorial:
|
|
|
|
> **Meet each solution only after you have experienced the problem it solves.**
|
|
|
|
That is why the tutorial does not start with MQTT, and not with dynamic subscriptions either. It first builds a system with deliberately awkward mediators, puts it into operation, and only then asks whether they have earned their place.
|
|
|
|
The second rule is about vocabulary: *Intent*, *Status/State* and *Event* are named only after they have been used. They appear in the tutorial around step 42, not before.
|
|
|
|
The planned route, from step 0:
|
|
|
|
```text
|
|
direct method calls → egoistic services → mediators → separate processes
|
|
→ filesystem as transport → Syncthing → "why all these mediators?" → rewind
|
|
→ services subscribe themselves → dynamic wiring → across processes
|
|
→ across Syncthing → when a mediator IS useful → MQTT
|
|
```
|
|
:::
|
|
|
|
::: {.fr}
|
|
L'étape 0 ne contient aucun code. Elle énonce le sujet : non pas ROT13, mais l'architecture autour de lui. La fonctionnalité reste presque inchangée pendant 81 étapes, et c'est précisément ce qui rend visibles les changements alentour.
|
|
|
|
Deux règles sont posées ici et valent pour tout le tutoriel :
|
|
|
|
> **Ne rencontrer une solution qu'après avoir vécu le problème qu'elle résout.**
|
|
|
|
C'est pourquoi le tutoriel ne commence ni par MQTT, ni par les abonnements dynamiques. Il construit d'abord un système aux médiateurs délibérément maladroits, le met en service, et demande seulement ensuite s'ils ont mérité leur place.
|
|
|
|
La seconde règle concerne le vocabulaire : *Intent*, *Status/State* et *Event* ne sont nommés qu'après avoir été utilisés. Ils apparaissent vers l'étape 42, pas avant.
|
|
|
|
L'itinéraire prévu, dès l'étape 0 :
|
|
|
|
```text
|
|
direct method calls → egoistic services → mediators → separate processes
|
|
→ filesystem as transport → Syncthing → "why all these mediators?" → rewind
|
|
→ services subscribe themselves → dynamic wiring → across processes
|
|
→ across Syncthing → when a mediator IS useful → MQTT
|
|
```
|
|
:::
|
|
|
|
::: {.de}
|
|
Schritt 0 enthält keinen Code. Er nennt das Thema: nicht ROT13, sondern die Architektur darum herum. Die Funktionalität bleibt über 81 Schritte fast unverändert — genau das macht die Veränderungen ringsherum sichtbar.
|
|
|
|
Zwei Regeln werden hier gesetzt und gelten für das ganze Tutorial:
|
|
|
|
> **Einer Lösung erst begegnen, nachdem man das Problem erlebt hat, das sie löst.**
|
|
|
|
Deshalb beginnt das Tutorial nicht mit MQTT und auch nicht mit dynamischen Abonnements. Es baut zuerst ein System mit absichtlich unbequemen Vermittlern, nimmt es in Betrieb und fragt erst dann, ob sie ihren Platz verdient haben.
|
|
|
|
Die zweite Regel betrifft das Vokabular: *Intent*, *Status/State* und *Event* werden erst benannt, nachdem sie benutzt wurden. Sie erscheinen etwa ab Schritt 42, nicht früher.
|
|
|
|
Die geplante Route, von Schritt 0 an:
|
|
|
|
```text
|
|
direct method calls → egoistic services → mediators → separate processes
|
|
→ filesystem as transport → Syncthing → "why all these mediators?" → rewind
|
|
→ services subscribe themselves → dynamic wiring → across processes
|
|
→ across Syncthing → when a mediator IS useful → MQTT
|
|
```
|
|
:::
|
|
|
|
## [The three questions]{.en}[Les trois questions]{.fr}[Die drei Fragen]{.de} {#sec-three-questions}
|
|
|
|
::: {.en}
|
|
The wording of the three questions matters, and it is easy to replace it with something weaker:
|
|
|
|
| The tutorial asks | A weaker version |
|
|
|---|---|
|
|
| Who **knows** whom? | who *communicates* with whom |
|
|
| Who **owns** what? | which *data* each part holds |
|
|
| Who **decides** how the system is wired? | which part *connects* everything |
|
|
|
|
"Knowing" is not "communicating": two components can exchange messages all day without either one naming the other. "Deciding the wiring" is not "connecting": the part that forwards messages need not be the part that chose the route. Both distinctions become concrete later — the first already in step 1, the second in part III.
|
|
:::
|
|
|
|
::: {.fr}
|
|
La formulation des trois questions compte, et il est facile de la remplacer par une version plus faible :
|
|
|
|
| Ce que demande le tutoriel | Une version plus faible |
|
|
|---|---|
|
|
| Qui **connaît** qui ? | qui *communique* avec qui |
|
|
| Qui **possède** quoi ? | quelles *données* détient chaque partie |
|
|
| Qui **décide** du câblage ? | quelle partie *relie* le tout |
|
|
|
|
« Connaître » n'est pas « communiquer » : deux composants peuvent échanger des messages toute la journée sans que l'un nomme l'autre. « Décider du câblage » n'est pas « relier » : la partie qui transmet les messages n'est pas forcément celle qui a choisi la route. Les deux distinctions deviennent concrètes plus tard — la première dès l'étape 1, la seconde dans la partie III.
|
|
:::
|
|
|
|
::: {.de}
|
|
Der Wortlaut der drei Fragen ist wichtig, und man ersetzt ihn leicht durch eine schwächere Fassung:
|
|
|
|
| Das Tutorial fragt | Eine schwächere Fassung |
|
|
|---|---|
|
|
| Wer **kennt** wen? | wer mit wem *kommuniziert* |
|
|
| Wer **besitzt** was? | welche *Daten* jeder Teil hält |
|
|
| Wer **entscheidet** über die Verdrahtung? | welcher Teil alles *verbindet* |
|
|
|
|
„Kennen“ ist nicht „kommunizieren“: zwei Komponenten können den ganzen Tag Nachrichten austauschen, ohne dass eine die andere nennt. „Über die Verdrahtung entscheiden“ ist nicht „verbinden“: der Teil, der Nachrichten weiterleitet, muss nicht der Teil sein, der die Route gewählt hat. Beide Unterscheidungen werden später konkret — die erste schon in Schritt 1, die zweite in Teil III.
|
|
:::
|