Skip to content
JDesk
Concepts

How IPC works

Versioned JSON envelopes, the bridge, the nonce, and the invoke lifecycle.

Everything crossing the boundary is a string — a single JSON envelope with a version field. The frontend sends invoke; Java answers with exactly one result; Java pushes event envelopes.

The channel is window.__jdesk ("the bridge"), injected over each platform's native channel. Every invoke returns a Promise, answered later by a correlated result; handlers run on virtual threads.

Each navigation mints a fresh 128-bit nonce echoed in every envelope. The invoke lifecycle runs ordered checks: size, nonce, handshake, request-id, registry lookup, capability (before deserialization), in-flight limit, deserialization, then the handler on a virtual thread.