Skip to content

Procwire

High-performance IPC for Node.js. Binary protocol for the data plane, JSON-RPC for control.

Binary Data Plane

Binary wire protocol with an 11-byte header for the data plane. Target: >1 GB/s throughput for large payloads.

Dual-Channel Architecture

Control plane (stdio, JSON-RPC) for lifecycle management. Data plane (pipe, binary) for high-throughput user data.

Type-Safe

Full TypeScript support with builder pattern and generics. Schema-first design where parent defines the contract.

Lean Dependencies

@procwire/protocol has zero runtime dependencies, and the parent/child runtime packages depend only on other @procwire/* packages. MessagePack ships built into @procwire/codecs; Apache Arrow is an opt-in peer via the @procwire/codecs/arrow subpath.

Cross-Platform

Named Pipes on Windows, Unix Domain Sockets on Linux/macOS. One API, all platforms.

High Throughput

A binary data plane instead of JSON-RPC delivers an ~80x throughput improvement for large payloads.

Procwire splits control from data so each channel uses the right protocol:

ChannelProtocolProfile
Control PlaneJSON-RPCsmall, infrequent
Data PlaneBinary~30 MB/s -> ~2.5 GB/s

JSON-RPC suits the small, infrequent control messages, but it would cripple the data plane:

  • ~5x larger payload (JSON text vs binary)
  • ~500ms serialization overhead per 1MB of data

The binary wire format avoids this overhead entirely.

Binary Frame (Data Plane):
+----------+-------+----------+----------+----------------------+
| Method ID| Flags | Req ID | Length | Payload |
| 2 bytes | 1 byte| 4 bytes | 4 bytes | N bytes |
+----------+-------+----------+----------+----------------------+