Shared-Memory Transport
IndexBus regions are file-backed shared memory (mmap). Multiple processes map the same file and communicate via atomic operations on the shared #[repr(C)] layout.
How SHM Regions Work
Lifecycle
- Create — The creator opens or creates the SHM file and initializes the layout (
initialized: 0→1→2). - Open — Other processes open the file and validate before use: magic, version, capabilities,
layout_bytes, and initialized state. - Crash handling — The safest approach is to recreate the region rather than reattach to a potentially corrupted one.
Production Requirements
Security Considerations
IndexBus SHM is designed for same-host, trusted-participant IPC. It is NOT:
- A network security boundary
- A cryptographic secrecy or integrity mechanism
- Safe for multi-tenant use without strong OS-level isolation
Risks and Mitigations
Delivery Semantics Summary
Cross-stream and cross-producer ordering is not guaranteed.
Memory visibility uses Acquire/Release atomics. Publication commit is the synchronization point.