TunnelVision

0004 — Live IPC via mmap ring buffer + Darwin signal

Context

The extension (producer) must stream a high rate of packet metadata to the app (consumer) for the live UI, across a process boundary, without saturating the system and without adding latency or memory pressure to the packet loop. Durable history already goes to SQLite, but that is not the right channel for a real-time, per-packet feed.

Decision

Use a fixed-size memory-mapped ring buffer in the App Group container as a lock-free single-producer/single-consumer queue, plus a Darwin notification posted (coalesced) as a wakeup only. The notification carries no data; the mmap carries the bytes. See ../spec/ipc.md.

Consequences

Alternatives considered