Skip to main content
Version: 0.3.0

The projections

A projection is how one contract is spoken. There are two, one per class of client, and each carries the whole contract.

What decides that a projection exists​

A projection exists for a class of client that can speak it and cannot speak what is already carried.

The clientCan openTherefore speaks
a native program on the host, or a program reaching the host over the networka socket the deployment names, carrying a typed binary protocollocal
a browserHTTP, and a WebSocket upgrade over the same origin — and nothing elsehttp+ws

A third value is added only by a change to the contract, and what it must name is the class of client that can speak it and cannot speak either of these.

local — the typed projection​

Protocol buffers carried by gRPC, with both traffic shapes on one bidirectional connection.

ShapeCarried by
controlrequests on the connection, each answered and correlated by an identity the caller chose
livethe same connection, carrying events and the channel's own state as they are concluded
a stream's dataa path of its own (streams to clients), never the connection where the client can reach a path

The name describes the ordinary binding and not a constraint: local on a routable address is the typed projection reached over TCP, which is what a remote operator's native tool speaks.

http+ws — the browser projection​

HTTP for the control shape and one WebSocket for the live shape, over one origin.

ShapeCarried by
controlan HTTP request under the surface's base path, one answer per request
liveone WebSocket, carrying events and the channel's own state
a stream's dataone binary WebSocket per subscribed stream

A browser cannot open a local socket, so an http+ws channel with no address is reachable only by a client that can — a webview embedded in a host process, or something in front that forwards. It is not refused.

The two axes are independent​

The projection says what a client speaks; the address says how much protection the channel has. Neither implies the other.

local socketloopbackroutable
localthe ordinary case: a native program on the hostthe typed projection with no peer identity behind ita native tool reaching the host over the network, with an authenticated transport and a credential
http+wsreachable only through something that can open a socketa browser on the machine, on a porta browser elsewhere, with an authenticated transport and a credential

The class is computed from the address and never from the projection's name.

A stream's data is a path, not a projection​

A flow that does not tolerate typed encapsulation gets a path of its own inside the channel it belongs to: a binary WebSocket in the browser projection, a transport the Core names in the typed one. It never gets a channel type of its own.

What every projection carries​

A capability reachable over one projection and not the other is a defect, so each carries the whole contract.

Every projection carriesSo that
every operation, with the same subject and the same answeradding a transport is a projection and never a redesign
the live shape without a polla display never shows a stopped instrument as running for the length of an interval
correlation as a field in the payloadthe pairing of an answer to its request is visible, and the same in both projections
a stream's sequence, unchangeda client can tell a lost frame from a reordered one