Inter-process communication GitHub issue

vibecode
{"vibecode": {
    "doc": "forking_ipc",
    "role": "spec for how Caspian processes communicate with each other. The answer: no dedicated IPC primitives. Caspian's IPC is the shared-resource pattern — a UDS-backed server holds the shared state; workers forked from the parent each get a wrapper proxying their operations to the server. Two flavors: shared-hash (lightweight, JSON-shaped state) and shared-mikobase (full database semantics). Both build entirely on the UDS + forking + auth toolbox.",
    "status": "committed for V1.0 (design) — implementation plan can't be fully written until Mikobase's own spec is settled, since shared-mikobase follows Mikobase's surface verbatim.",
    "depends_on": "UDS, forking, Mikobase, and shared-hash specs",
    "framing": "Caspian doesn't have threads, but its IPC is invisible — workers just touch a shared structure",
    "key_concepts": ["ipc_is_the_shared_resource_pattern",
        "no_dedicated_send_receive_primitives",
        "two_flavors_shared_hash_and_shared_mikobase",
        "server_holds_authoritative_state",
        "workers_see_a_wrapper_that_proxies_their_ops",
        "ipc_implementation_plan_gated_on_mikobase_spec"]
}}

Caspian doesn't have threads, and it doesn't have classical IPC primitives either. There's no send_message, no pipe API, no shared-memory protocol. Instead, Caspian's IPC is the shared-resource pattern: a small server process holds the shared state; each forked worker gets a wrapper that looks like a normal data structure but proxies every operation to the server.

Workers don't know they're doing IPC. They just touch a hash, or query a database, or make method calls on what looks like a regular object. The wrapper translates each operation into an HTTP request against the server; the server is single-threaded so all requests serialize naturally; workers see a consistent point-in-time view.


Two flavors GitHub issue

Both built from the same UDS + forking + auth toolbox; differ only in what they share.

Shared hash — lightweight JSON-shaped state GitHub issue

$uds.share(N) do($hash) ... end (see shared-hash.md).

Use when workers need to coordinate via shared scratch state, accumulate results, share a counter or registry, etc. Lightweight, fast, no schema or query layer.

Shared mikobase — full database semantics GitHub issue

$uds.mikobase(N) do($db) ... end (see mikobase.md).

Use when workers need real database semantics — query-based coordination, schema-validated records, complex object relationships, etc.


Why this shape GitHub issue

Caspian could have invented a dedicated IPC primitive — pipes, shared-memory channels, message queues, actor mailboxes, etc. It deliberately doesn't. Three reasons:

The cost is per-operation HTTP round-trips. For high-throughput coordination this might be limiting; for the share-block use cases the cost is negligible (microseconds per round-trip on a same-host UDS). Atomic-update primitives (.atomic_increment, .modify(key) do ... end) can be added later for hot patterns without changing the API shape.


Permissions GitHub issue

The whole IPC layer inherits the broader permission model:

No additional IPC-specific permission flags. The existing UDS / network / fork grants cover everything.


Implementation plan status GitHub issue

The DESIGN for IPC is committed for V1.0:

The IMPLEMENTATION plan can't be fully written yet because shared-mikobase's wrapper must mirror Mikobase's API — and that API is still being settled in the Mikobase spec. Until Mikobase's interface is nailed down:

Once Mikobase settles, the shared-mikobase wrapper and server are mechanically derivable from it — that's the whole "wrapper follows the surface" framing.

Until then, this doc captures the design; the implementation plan is gated on the Mikobase spec.


See also GitHub issue


© 2026 Puck.uno