Lattice, the message bus

Bus · Layer 1

"Fetches messages between everyone."

What Lattice does

Lattice is our name for the bus. A service publishes to a subject, and anything that cares subscribes. Nobody calls anybody else directly, so you can add or swap a part without touching the rest.

Subject-based routing

Messages are addressed by subject, not by destination. Senders and receivers stay decoupled.

MQTT between machines

Devices and machines talk over an MQTT broker, which is the same wire your edge firmware already speaks.

An in-process event bus

Inside the daemon, services use an event bus. The browser gets those events live over server-sent events.

Mx for state

Mx keeps the last value and a history for each mx:// subject, so a new subscriber gets the current state straight away.

Wildcard subscriptions

Subscribe to a whole branch with MQTT wildcards instead of listing every topic.

Heartbeats and versions

Every service publishes an immutable build version and a heartbeat. Divergence is detected and healed.

How it works

One reading, several listeners, no coordination. These are real subject shapes from the platform.

  1. A publisher puts a message on a subject.
  2. Mx stores the latest value and history for the subject.
  3. Every subscriber to a matching pattern gets the message. Late joiners get the stored value.

Where it fits in the four layers

1 Infrastructure & roles Vera, Grant, the bus, the device registry
2 Data pipeline & state Flo, DynaRAG, the carousel
3 Reasoning & inference Rick, Annie, Max, Hank
4 UI & collaboration Marco, Noted, Norm, the graph

Lattice is the layer 1 rule that holds the others apart. Layers publish and subscribe; they don't call each other.