liminal-bus-protocol 0.1.0

The liminal bus's wire protocol: frames, their codec, envelopes, version and schema negotiation, and stream multiplexing
Documentation
  • Coverage
  • 68.29%
    280 out of 410 items documented0 out of 117 items with examples
  • Size
  • Source code size: 265.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.3 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • tomWhiting

liminal-bus-protocol

The wire protocol of the liminal bus: what a client and the server send each other on one connection.

It holds:

  • the frames (Frame, FrameHeader, FrameType) and their codec (encode, decode, encoded_len);
  • the message envelope (MessageEnvelope, SchemaId) and its causal context (CausalContext, MessageId);
  • DeliveredId, the server's id for a delivered message, which a reply names as its parent;
  • version and schema negotiation, the handshake and the connection lifecycle;
  • stream multiplexing and the backpressure payloads;
  • the refusal a worker can give a pushed request (WorkerRefusal);
  • ProtocolError, with its stable reason codes.

It does not hold the participant-lifecycle wire. That is liminal-protocol's, and the two are versioned apart. Nor does it hold anything of the server: no storage, no runtime, no haematite and no beamr.

It depends on serde_json and thiserror and nothing else.

Who uses it

  • liminal-rs re-exports it as liminal::protocol, so liminal::protocol::X and liminal_bus_protocol::X are one type.
  • liminal-sdk's std client depends on it in place of liminal-rs.
  • The TypeScript SDK's wasm bridge (sdks/liminal-ts/wasm-src) depends on it.

Move liminal-rs and liminal-sdk together. A graph that holds liminal-rs 0.16.24 or older beside liminal-sdk 0.20.22 or newer holds two DeliveredId types, and they do not mix.

Licence

AGPL-3.0-only, as liminal-rs, from which this code moved (PROTO-011).