Local Path — Zero Copies, Zero Serialization
When publisher and subscriber are on the same machine, data never leaves shared memory: Like a whiteboard in a shared office — the publisher writes, the subscriber reads. Nobody makes a photocopy. What happens step by step:- Publisher allocates a region in shared memory (iceoryx2)
- Data is written directly — no serialization, no intermediate buffers
- Subscriber reads from the exact same memory location
- Total latency: ~60 ns regardless of message size
This is why a 6 MB camera image and a 24-byte pose message have the same transport overhead locally — neither gets serialized or copied. The cost is a pointer exchange, not a data transfer.
Network Path — Serialize Only When Necessary
When publisher and subscriber are on different machines, serialization happens asynchronously on a background thread: Local subscribers still get ~60 ns latency even when network subscribers exist. The network path runs independently. What happens step by step:- Publisher writes to shared memory — local subscribers see it immediately
- Publisher queues the message for the network background thread (non-blocking)
- Background thread serializes the data to bytes
- Serialized bytes are sent over Zenoh
- Remote subscriber receives and deserializes
- Latest-message semantics — if the publisher sends faster than the network delivers, only the newest message is queued
Network latency does not affect local subscribers. Even if the network is congested or down, local pub/sub continues at full speed.
Automatic Discovery
The system discovers topics and selects paths without manual configuration:| Step | What Happens |
|---|---|
| 1. Discovery | Cerulion discovers all available topics across every device on the network |
| 2. Path selection | System checks if the topic exists locally or only on remote machines |
| 3. Local match | Topic found locally → zero-copy shared memory path |
| 4. Network fallback | Topic only on remote machine → Zenoh network path |
| 5. Adaptation | When remote subscribers appear or disappear, network publishing enables/disables automatically |
Like labeled conveyor belts in a factory — each topic has its own belt, and the system automatically routes data through the fastest available path. You never touch the routing.