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.

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:

Lane KindSemanticsUse Case
EventsGeneral message passing with bounded capacityDefault data flow
JournalOrdered append log with reader trackingAudit trails, replay sources
SequencedSlotsFixed-capacity sequenced slots with gatingOrdered bounded buffers
FanoutBroadcastBroadcast to N consumers with bounded memoryMulti-reader patterns

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

┌──────────┐    ┌───────────────┐    ┌──────────┐
│ Producer  │───▶│  SHM Region   │───▶│ Consumer │
│ Process   │    │  (lanes +     │    │ Process  │
│           │    │   headers)    │    │          │
└──────────┘    └───────────────┘    └──────────┘

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_full policy 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 tmpfs or hugetlbfs mounts
  • 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 Benchmarking for methodology and public baseline interpretation. See Performance Tuning for operational guidance.

Deeper Technical Sources

  • Rustdoc entry points
Provenance
Need the source docs?
Use the public hub to orient yourself, then jump to repo-owned docs or rustdoc when you need contract-level detail.
Reference hub