iceoryx2zerocopy

iceoryx2 Insights - Local-First Communication

Christian Eltzschig — 28/11/2026

Introduction

This is the first article in a little series where I want to provide some insights into the internal architecture of iceoryx2 and, more importantly, why it is designed the way it is. I also want to elaborate on the roadmap and technical direction we envision for iceoryx2.

Modern autonomous machines and embedded systems rarely live inside a single process anymore.

A system may span multiple processes, programming languages and operating systems. Development may start on Linux with C++, Rust or Python and later move onto specialized embedded hardware or real-time operating systems. GPUs, FPGAs and other accelerators may become part of the architecture. Data may need to be recorded for simulation, exposed to tooling, exchanged with safety-critical domains or sent to cloud services.

All of these components need to communicate.

A naive approach is to use a network protocol everywhere. After all, network protocols are designed to connect heterogeneous systems and are widely supported.

But this raises an important architectural question:

Should local communication pay the cost and complexity of remote communication, even when the data never leaves the machine?

With iceoryx2, our answer is no. Our architectural principle is local-first communication: exploit locality wherever possible and cross into network communication deliberately only when the communication boundary actually requires it.

Local-First Communication

Not all communication boundaries are equal. Communicating with another process on the same machine is fundamentally different from communicating across the local network, to another operating system or a cloud service. Network protocols need to solve problems such as:

  • serialization and deserialization
  • packetization
  • transport reliability
  • end-to-end protection
  • routing
  • network byte order
  • sockets and kernel transitions

Those mechanisms are necessary when data crosses a machine boundary. But when two processes already share the same physical memory, many of them are unnecessary.

This is why iceoryx2 follows a local zero-copy-first approach:

  1. data is delivered locally without serialization whenever possible
  2. shared memory is the primary local data path
  3. copying, serialization, sockets, syscalls and complex network stacks are introduced only when the communication boundary requires them
  4. local and remote communication remain separate mechanisms instead of forcing both through the same transport

Local-first is the architectural principle.

Zero-copy shared-memory communication is the mechanism that allows us to implement it efficiently.

sequence-lock

This keeps the local path fast and predictable. With growing data volumes, this becomes increasingly important. High-bandwidth sensors can quickly turn the serialization, copying and kernel transitions of network stacks into CPU and memory bottlenecks. Latency spikes appear, memory bandwidth is wasted and a communication mechanism that initially seemed convenient begins to dominate the system.

Therefore, the network stack is not the foundation of communication in iceoryx2. It is a boundary that is crossed when required.

What Local Shared Memory Enables

The advantage of local-first communication is not limited to lower latency. Once communication state and payloads live in shared memory, a number of communication patterns become possible without introducing mechanisms that would normally be required in a distributed system.

Many of these features are direct consequences of the same architectural decision: the data already exists in memory that all participating processes can access.

Zero Serialization

When communication stays on the same machine, the sender and receiver can operate directly on the same representation of the data. There is no need to serialize the payload into an intermediate format, copy it through a socket and deserialize it again on the receiving side.

The only requirement is that the data structure has a memory layout that can safely be shared between the participating processes and programming languages. iceoryx2 already provides such cross-language data types, allowing compatible data structures to be accessed directly from different programming languages.

Cross-language shared-memory payload

The important point is not merely that this is faster. Different programming languages do not automatically imply that serialization is necessary. If they can agree on the memory layout, they can share the representation itself.

Nearly Instant History Delivery

History is another example of how locality changes the implementation. Communication endpoints in iceoryx2 are backed by structures in shared memory. When a receiver connects late, previously sent data is already available in shared memory. The receiver does not need to request it from the sender. The sender does not need to rewrite it. No background service has to copy and cache the history. All that remains is to enqueue the 8-byte offsets to the historical payloads in the receiver's buffer.

The data already exists. The receiver only needs to access it.

History delivery through shared memory

This makes history delivery nearly instant and avoids the need for a separate local caching infrastructure. The overhead of delivering the history is minimal and depends only on the number of samples, not on their size.

We have also implemented an iceoryx2 extension for safety-critical environments in which the communication setup is static and all shared memory resources are created up front and protected by POSIX access permissions. With this setup, even the offsets are already in place, making history immediately accessible without any additional delivery overhead.

Enhanced Backpressure Strategies

A similar property applies when a sender delivers data faster than a receiver can process it. In a shared-memory system, the sender can react directly according to a predefined strategy. If the available buffer is exhausted, the oldest or newest data can be directly recycled.

Only the ownership of the shared-memory payload changes.

Backpressure handling through sample recycling

Backpressure is also a concern in distributed systems. The difference is that shared memory lets us solve the problem locally without additional transport buffers or coordination over the network. By default, the sender does not have to wait for the receiver. When old samples are recycled, a slower receiver can continue with the latest available data. If dropping samples is unacceptable, a blocking backpressure strategy can be explicitly enabled instead.

Shared State Instead of Message Transfer

Locality becomes even more interesting when communication is no longer viewed purely as transferring individual messages. Sometimes the data itself represents shared state.

A Central Key-Value Repository

The iceoryx2 blackboard messaging pattern allows applications to safely share key-value pairs across processes. It can represent a configuration, a global state or other information that multiple processes need to observe.

Because the blackboard itself resides in shared memory, consumers do not have to ask another process for the current value. They can access the state directly, without syscalls and context switches.

Shared-memory blackboard

This is an important difference in perspective! Locally, not every interaction needs to become a message exchange. Sometimes the best communication mechanism is simply to make the state safely accessible.

Introspection and Live Tracing

The same principle also changes how tooling can interact with a running system. If the runtime state already resides in shared memory, tools can inspect that state directly without requiring every application to expose a separate diagnostics interface.

This enables low-cost introspection of a running iceoryx2 system, e.g. via ekxide's Mission Control GUI.

Shared-memory introspection

The same idea can be extended to tracing. Processes can store live tracing information in shared memory, where tooling can analyze it without routing the tracing data through the application's normal communication path.

Shared-memory live tracing

Introspection and tracing still consume resources, there is no such thing as a free lunch. But sharing the underlying state allows us to keep the additional communication overhead at a minimum.

This is particularly valuable when trying to analyze timing-sensitive systems without significantly changing the system by observing it.

Separate Data Flow from Control Flow

One of the most important consequences of shared-memory communication is that moving data and waking up a process no longer have to be the same operation.

With sockets and many network-oriented communication mechanisms, every data transfer naturally crosses into the operating system. Shared memory does not require that. The data path can remain entirely in userspace.

Separated data and control flow

A process running in a cyclic control loop or a busy loop may only care whether new data is available. It can inspect the shared-memory state directly without a syscall in the data path.

A reactive application, on the other hand, may want to sleep until new data arrives. In that case, a notification mechanism can explicitly be added to the control path.

This distinction is important:

Data flow answers how data becomes accessible.

Control flow answers when another process should run.

When those concerns are separated, the application can choose the mechanism that matches its execution model instead of paying for wakeup semantics on every communication operation.

For latency-sensitive and real-time systems, this can make a substantial difference.

Locality as an Architectural Boundary

Local-first communication is therefore not only a performance optimization. It also creates a useful architectural boundary. Inside the machine, iceoryx2 can maintain a fast zero-copy data plane with predictable behavior.

Outside the machine, communication may need serialization, network stacks, protocol translation, additional security mechanisms and other functionality required by distributed systems. Keeping those worlds separated means that the complexity of the network does not automatically become part of the local communication path.

This becomes particularly valuable in mixed-criticality systems.

Mission-Critical Deployments

Consider a safety-critical domain that uses iceoryx2 internally. The communication inside this domain may need to satisfy strict requirements around determinism, isolation and certification. At the same time, the system may still need to exchange data with external networks, tools or non-critical applications.

Those external components may depend on network stacks or protocol implementations that are not part of the certified safety domain. Instead of pulling that complexity into the critical system, the network-facing component can remain outside.

Mixed-criticality deployment

The local shared-memory communication path can stay inside the safety boundary while network communication is handled by a separate, unprivileged process.

Locality therefore becomes useful not only for performance, but also for isolation.

The Transport Should Not Define the Communication Model

There is a broader architectural idea behind all of this. Applications usually think in communication semantics:

  • publish and subscribe
  • request and response
  • events
  • shared state
  • streams

Those semantics should not be defined by whether the underlying data happens to travel through shared memory, UDP, TCP, DDS, MQTT or another protocol. The transport is an implementation choice dictated by the communication boundary.

Locally, shared memory has capabilities that are too valuable to give up. Remotely, network protocols solve problems that shared memory cannot.

Trying to force both through the same mechanism usually means accepting the lowest common denominator. iceoryx2 instead starts with the strongest mechanism available for local data transport and introduces remote transport only where it is actually needed.

That is what local-first communication means.

Remote Communication as an Extension

Of course, real systems do not stop at the machine boundary. They need to communicate with other hosts, ROS 2 systems, cloud infrastructure, DDS participants, SOME/IP services, MQTT brokers and many other ecosystems.

The goal of iceoryx2 is not to isolate local shared-memory systems from those environments. Quite the opposite. The architectural idea is that remote communication should extend the local data plane rather than define it.

This leads to the next question:

Can applications keep the same communication model while the underlying protocol changes at the system boundary?

That is the topic of the next article in this series:

iceoryx2 Vision: One API, Many Protocols

There we will look at tunnels, gateways and the architecture we envision for connecting iceoryx2 to other communication ecosystems, while keeping local communication insanely fast and safe.