Everything Crosses One Transport — Rakuen Software
Rakuen's Aimee uses a single shared-memory event bus as the mandatory path for all inter-module communication, making audit, capability control, and ordered observation cheap enough that engineers won't bypass them. The transport achieves 134 nanoseconds median latency—comparable to language-crossing costs—while keeping the host process free of garbage collection pauses.
- A single transport eliminates the death-by-a-thousand-exceptions problem: when the common path is too slow, components start bypassing it with direct calls, local logging, and permission checks, turning system-wide guarantees into scattered instrumentation.
- The event bus uses shared-memory ring buffers (inspired by LMAX, virtio, and io_uring) with a mandatory full-stream tap for governance, allowing modules in different languages to communicate without language-specific bindings or per-event syscalls.
- Grants declare what each process can publish, subscribe to, serve, and request—turning ambient authority into a readable contract checked at attach time, which matters for AI components whose runtime behavior can't be fully predicted.
Rakuen Software built aimee, an open-source knowledge platform for company AI work, around a single transport layer that handles all inter-module communication. The core insight is that governance—capability grants, audit trails, and access control—needs to be cheap enough that engineers won't bypass it. If the common path is slow, teams will route around it with direct calls, local logging, and permission checks scattered everywhere, turning system-wide guarantees into a fragmented mess of exceptions. Aimee routes everything through a broker-mediated message router built on shared-memory rings, similar to LMAX, virtio, and io_uring. What's novel is combining that ring-buffer approach with mandatory full-stream audit tapping and required governance paths for inter-module traffic.
The transport achieves 134 nanoseconds median latency for dispatching a 16-byte event and 117 nanoseconds for audit logging on their test hardware, with a 1,000 nanosecond regression ceiling enforced at merge time. That's in the same cost class as a cgo crossing between C and Go (38–164 ns depending on call complexity), which matters because it means you're spending roughly what a language-specific boundary costs but getting a boundary with no language dependency. A module can talk to Go today and another protocol client tomorrow without either endpoint needing bindings to the implementation language. Stacking these crossings across a single request—memory recall, confidence checks, governance approval, then the actual work—can create unpredictability if each hop is slow, so the 1,000 ns budget defends against that accumulation.
The transport requirement drove the language choice. They needed direct control over memory layout and buffer lifetime in the dispatch path, which narrowed it to C or Rust; they chose C to avoid a managed runtime in the host. A garbage collection pause in the component ordering every governed crossing becomes everybody's pause, so allocation and lifetime had to be explicit there. Module processes can use their own runtimes because the host owns the budget-constrained path. Clients attach once—the daemon verifies them against a grant and hands over anonymous memory regions with SCM_RIGHTS, then that handoff channel closes. Everything after is pure shared-memory reads and writes with no syscalls per event. A Go client can map the protocol without cgo, speaking directly to the shared rings the host manages.