Skip to main content

Introduction

This page explains how data flows through Cerulion Core’s dual transport system. Understanding the data flow helps you optimize your application and debug communication issues.

Local Communication Flow

When publisher and subscriber are on the same machine: Steps:
  1. Publisher writes directly to shared memory (iceoryx2)
  2. Subscriber reads from the same memory location
  3. No serialization - data is referenced byte-for-byte
  4. Latency: < 1 μs for messages
Local communication uses zero-copy shared memory. The publisher writes data directly to a shared memory region, and the subscriber reads from the same location. No serialization or network overhead occurs.

Network Communication Flow

When publisher and subscriber are on different machines: Steps:
  1. Cerulion allows users to display all available topics on any device running Cerulion on the network
  2. Subscriber specifies which topic to subscribe to
  3. Cerulion determines whether the topic is found locally or not
    • If the topic is not found locally, Cerulion requests the topic over the network
    • Any Cerulion machine with that topic will now broadcast over Zenoh and locally
  4. Publisher sends data to background thread (non-blocking)
  5. Background thread serializes data to bytes
  6. Serialized bytes sent over Zenoh network
  7. Network subscriber receives and deserializes
  8. Network latency doesn’t slow down local publishing
  9. Only the latest message is queued (latest-message semantics)
Network communication happens asynchronously on a background thread. The publisher returns immediately after queuing the message, ensuring local publishing never blocks. Only the latest message is queued, so if the network is slow, newer messages replace older ones.

Key Differences

AspectLocal FlowNetwork Flow
SerializationNone (zero-copy)Automatic (raw bytes)
Latency< 1 μs1-10 ms
BlockingMinimal (memory alloc)Non-blocking (background thread)
ThroughputMemory bandwidthNetwork bandwidth
RangeSame machineAny machine on network

Discovery and Selection

The system automatically discovers topics and selects the optimal path:
  1. Topic Discovery: All available topics on any Cerulion device are displayed
  2. Path Selection: System determines if topic is local or network-based
  3. Automatic Routing: Messages are routed through the optimal path
The discovery mechanism ensures that subscribers automatically find publishers, whether they’re on the same machine or across the network. The system handles all the complexity of path selection transparently.

Next Steps