8  Part VII — Now merge the two architectural ideas

Two mediators were removed and the gain was measured. Steps 48 to 52 answer the obvious next question: does that make mediation wrong? No — and the distinction that decides it is sharp enough to apply to a design you have never seen.

8.1 A transformer earns its existence

What was removed was a mediator computing A → A: an expensive identity function, in the availability chain, copying every message without adding meaning.

Now take a producer publishing {"value":"Hello"} and a consumer expecting a display structure. A TextToDisplayTransformer between them contributes schema transformation, semantic adaptation, possibly unit conversion, possibly aggregation. That is work neither side should own: ROT13 is not meant to decide terminal colours, and the console is not meant to understand ROT13’s payload shape.

The line is drawn by contract compatibility, not by whether something is added. A mediator converting Celsius to Fahrenheit changes rather than adds and has earned its place; one appending a timestamp to a message the consumer already understands has added something and is still suspicious. The question is always: could the consumer read the producer’s message as it stands?

If a consumer semantically understands a producer’s publication, direct subscription is often sufficient. If the contracts are incompatible, introduce a transformer that performs an actual adaptation.

A mediator that merely forwards compatible data is suspicious. A mediator that adds necessary semantics has earned its existence.

8.2 The transformer is egoistic too

Inserted into the chain, the transformer subscribes to rot13/outbox and publishes to its own outbox; ConsoleOut then subscribes to the transformer’s outbox instead of ROT13’s. Note what that costs in code: nothing. ConsoleOut receives a different Intent — TOPIC display/outbox rather than TOPIC rot13/outbox — and the chain is rewired. ROT13 never learns the transformer exists; the transformer never learns ConsoleOut exists.

Why not let it publish straight into consoleOut/inbox, saving a mailbox? Four reasons:

  • knowledge — it would contain ConsoleOut’s name, which is topology inside a service, the relapse of step 28;
  • ownership — that inbox is ConsoleOut’s control channel, written by the configurator; payload from the transformer would give it two authorities;
  • reach — its own outbox can be read by a logger, a web view or a second display at no cost, while one inbox serves exactly one consumer;
  • mutability — an aggregator can later be inserted after it by sending one different Intent, with no component edited.

8.3 The complete filesystem architecture

Every mailbox with exactly one writer:

mailbox single writer
consoleIn/outbox SensorService
rot13/outbox ProcessorService
display/outbox the transformer
every control inbox the configurator — the one designated Intent authority
the terminal ActuatorService, which writes no mailbox at all

Egoistic capabilities, Intent from one authority, a transformer only where contracts differ, one writer per resource, and the topology nowhere in the capabilities. That is the design the filesystem was good enough to teach — and the next part asks what the filesystem itself is no longer good enough for.