Overview
Cerulion Core is the foundational pub/sub communication library that powers the Cerulion platform. It provides a high-performance messaging system with automatic serialization, dual transport modes (zero-copy local and async network), and multi-language code generation from a single schema definition.What is Cerulion Core?
Cerulion Core is a modern pub/sub system built for real-time applications. Think of it as a high-speed messaging highway that connects different parts of your application, whether they’re running on the same machine or across a network. It automatically handles the complex details of message serialization, transport selection, and type safety, so you can focus on building your application.Cerulion Core uses iceoryx2 for zero-copy local communication (shared memory) and Zenoh for network communication. This dual-transport architecture gives you the best of both worlds: sub-microsecond latency for local communication and reliable network transport for distributed systems.
Why Use Cerulion Core?
Zero-Copy Local Transport
Sub-microsecond latency for local communication using shared memory. No serialization overhead for same-machine messaging.
Automatic Serialization
Works with any
Copy type automatically. No need to manually define protobuf messages for simple structs.Async Network Publishing
Non-blocking network sends ensure local publishing never waits for network latency. Latest-message semantics keep you current.
Multi-Language Support
Generate Rust, Python, and C++ code from a single YAML schema. Binary-compatible across all languages.
Type Safety
Compile-time guarantees in Rust, runtime validation in Python/C++. Prevents message compatibility errors.
High Availability
Network failures don’t block local communication. System prioritizes availability over guaranteed network delivery.
How It Works
Cerulion Core uses a dual-path architecture that optimizes for both local and network communication:Local Path (Zero-Copy)
When publisher and subscriber are on the same machine:- Publisher writes directly to shared memory (iceoryx2)
- Subscriber reads from the same memory location
- No serialization - data is copied byte-for-byte
- Latency: < 1 μs for small messages
Network Path (Async)
When publisher and subscriber are on different machines:- Publisher sends locally (fast, non-blocking)
- Background thread serializes and sends over Zenoh
- Network latency doesn’t slow down local publishing
- Only the latest message is queued (latest-message semantics)
Key Features
Automatic Serialization
AnyCopy type automatically works with Cerulion Core:
Code Generation from Schemas
Define your message types in YAML, generate code for multiple languages:Topic Manager
Centralized pub/sub management with automatic discovery:- Shared Zenoh session (reduces overhead)
- Automatic network enable/disable based on subscribers
- Type safety validation
- Keep-alive tracking
Architecture Overview
Cerulion Core consists of several key components:- Publisher: Sends messages to topics (local + network)
- Subscriber: Receives messages from topics (auto-detects local vs network)
- TopicManager: Centralized management with discovery protocol
- Serialization: Automatic for
Copytypes, optional protobuf support - Code Generation: YAML schemas → Rust/Python/C++ code
Cerulion Core is designed to be the foundation of the Cerulion platform. It provides the low-level messaging primitives that higher-level tools build upon.