Pavia vs gRPC

gRPC is built to connect services in and across data centers. From a browser, gRPC-Web, tonic-web and Connect reach only part of it. Pavia is built for the browser session: every call shape, in both directions, on one connection.

What a browser can call

What a browser can call with gRPC-Web, tonic-web, Connect and Pavia
QuestiongRPC-Webtonic-webConnectPavia
UnaryWorksWorksWorksWorks
Server streamWorksWorksWorksWorks
Client streamNoNoNoWorks
BidirectionalNoNoNoWorks
Server calls the clientNoNoNoWorks

gRPC-Web streams from the server only in its text mode. A dark dot is a caller message, a green dot a callee message.

The Pavia column describes the protocol as its specification defines it, and the reference implementation as it is designed. The conformance matrix shows which levels each implementation passes.

USE THEM TOGETHER

Pavia at the edge, gRPC behind it.

Keep gRPC where it shines, between services. Put Pavia on the connection to the browser, where the server needs to push, call back and track who is online.

Browsergenerated TypeScript client
PaviaWebTransport · WebSocket
Your Rust serveraxum · Pavia · tonic client
gRPCHTTP/2 · Protobuf
Billing service
Search service
Any gRPC service

BEYOND THE CALL

What a long-lived session adds.

gRPC describes calls. A real-time app also needs to know who is connected and what they missed. With gRPC you build these yourself; in Pavia they are part of the protocol.

  • Targeting

    Notify one session, every session of a user, a group or everyone, in one send.

    With gRPC: keep a registry of open streams and fan out yourself.

  • Channels with history

    Subscribe with the last epoch and offset you saw and get everything after it, with no gaps.

    With gRPC: a server stream per topic, plus your own replay log.

  • Presence

    A snapshot on subscribe, then joins, leaves and updates as events.

    With gRPC: track connections and broadcast changes yourself.

  • Resumption

    A dropped transport resumes the same session and replays what was missed.

    With gRPC: the stream ends with an error and the client starts over.

COMING FROM GRPC

Familiar ideas, one session.

Deadlines, metadata and status codes work the way you expect. The contract is a manifest instead of a .proto file.

service / rpc
Service and method in the contract manifest
stream keyword
Call shape unary, server, client or bidirectional
grpc-timeout
Deadline on every call
Metadata
Metadata per call
Status codes
Call status codes with structured details
Protobuf
cbor or json codec chosen per session
protoc / buf generate
Client generation from the manifest
Server reflection
Contract endpoint a well-known URL with the manifest

Questions

Why not run gRPC-Web in the browser?

It covers unary calls and server streams. Client streams, bidirectional streams and calls from the server to the browser need a different protocol. gRPC-Web also needs a proxy such as Envoy, unless the server speaks it itself as tonic-web does.

Does Pavia replace gRPC between my services?

No. gRPC is built for calls between services, with official support in a dozen languages. Pavia is for the connection between your server and its browsers and apps.

Does Pavia use Protobuf?

No. Frames are binary CBOR, and payloads use the cbor or json codec. The contract is a machine-readable manifest that client generators read.

Does Pavia need a proxy?

No. The browser connects straight to the server over WebTransport or WebSocket.

Can Pavia and tonic run in the same Rust server?

Yes. The reference server mounts as an axum route, and the same process can call your services with a tonic client.

Sources, checked November 2026

More comparisons

Follow Pavia as it grows.

Subscribe to the Pavia newsletter.

One email per milestone. Unsubscribe from any email.

Star wolfware-labs/pavia