Introduction
Pavia is a real-time RPC and messaging protocol between browsers/apps and servers. One persistent session carries calls in both directions and lets the server target sessions, users and groups. On top of that:
- Typed contracts in both directions, described by a machine-readable manifest (§12) so clients can be generated.
- Multiplexed calls with four shapes (unary, server stream, client stream, bidirectional), cancellation, deadlines, metadata and structured errors.
- Modern transports: WebTransport over HTTP/3 as the preferred binding, WebSocket as the universal fallback, with one logical protocol over both.
- Datagrams for lossy, latest-value data.
- Channels with durable history, gapless recovery and presence.
- Session resumption across transport loss.
- One logical protocol, two bindings (WebTransport, WebSocket), with identical application semantics except where §4 states otherwise.
- Binary, compact and cheap to route: envelopes are parseable without decoding user payloads, so fan-out serializes each payload once.
- Evolvable: unknown extension frames and unknown header keys can be ignored; versions and capabilities are negotiated.
- Implementable by third parties from this document plus the test vectors (§17).
From the specification: §1.1.