Learn / Wiring
Wiring versus Projection and metadata
A Projection is a pure, typed read of the Model: codec, read, dependency
paths, and opaque metadata. Metadata is the per-package extension point —
Remote attaches its fetch requirements under its own Metadata.key, and other
packages do the same under theirs. Surface merges metadata when projections
combine and summarizes it for inspection; it never interprets another
package's entries.
Wiring is not metadata and does not ride on it:
- Metadata flows Model → package ("this projection needs these fields").
Wiring flows Message → Model (
route) plus startup and subscriptions. - A wiring's subscriptions are built from projections' metadata at runtime (Remote diffs the requirements its entries read against the store), but the wiring itself is a separate value with its own lifecycle: route per Message, init once, entries for the runtime.
- If you need a new fact to travel with a Projection, add a metadata key. If you need a new integration to join an application, add a wiring.