IndexBus Overview
IndexBus is the bounded shared-memory transport substrate at the base of the ByteOr stack. It provides deterministic lane semantics, zero-copy IPC, and bounded-memory data flow between cooperating processes.
This page is a public-hub summary. The canonical transport contracts and crate-level API detail live in the synced IndexBus docs and same-site rustdoc.
What IndexBus Does
IndexBus solves the IPC problem for real-time systems: move data between processes on the same host with deterministic behavior, bounded memory, and no serialization overhead.
- Shared-memory regions with
repr(C)layouts for cross-language interoperability - Deterministic lane semantics — well-defined capacity, backpressure, and ordering guarantees
- Router and merge infrastructure — fanout and fan-in with bounded memory
- Zero-copy — no serialization, no allocation in the hot path
IndexBus is open source (Apache-2.0 / MIT) and can be used independently of ByteOr.
Lane Kinds
IndexBus defines four lane kinds, each with specific semantics:
Backpressure
When a lane is full, behavior depends on the on_full policy:
- Block — the producer waits until space is available
- Drop — the oldest entry is overwritten
Start With These References
Architecture
Processes communicate through shared-memory regions. Each region contains lanes with headers that track read and write positions. The repr(C) layout ensures any language with C FFI can participate.
Router and Merge Infrastructure
For complex topologies, IndexBus provides:
- Routers — distribute messages from one producer to multiple lanes based on routing policy
- Merges — combine messages from multiple lanes into a single output lane
Both operate with bounded memory and deterministic ordering guarantees.
v1 Semantics
The v1 semantics define the normative behavior for lane operations:
- Initialization — region and lane setup, header validation
- Write — bounded write with
on_fullpolicy enforcement - Read — position-tracked reads with ordering guarantees
- Capacity — fixed at creation time, enforced throughout lifetime
- Ordering — guaranteed within a lane, defined by lane kind across lanes
Production Requirements
IndexBus production deployments require:
- SHM files on
tmpfsorhugetlbfsmounts - No stale SHM files from previous runs
- Correct file permissions (cooperating-process trust model)
- Adequate memory for all lane capacities
- Router and merge infrastructure sized for the topology
Performance
IndexBus is designed for high-throughput, low-latency IPC:
- No system calls in the hot path
- No serialization or allocation
- Cache-line-aware layout for producer/consumer pairs
- Spin-wait or backoff wait strategies configurable per deployment
See Performance Tuning for operational guidance.