Skip to main content
Version: 0.14.0

The wire

The administrative surface travels as two gRPC services, one per projection, over one union of operations. The operator service answers a call or streams an answer; the shell service holds one bidirectional connection made of frames. This page gives which method carries which operation, the frame a held connection adds, the opening frame the Core sends, the order frames keep, and how the version is stated. The encoding, the framing and the shape of a refusal are the ones every Yoke surface shares. Field numbers and syntax are in the protocol definitions, yoke.administrative.v1, which are authoritative on the bytes.

Two services over one union​

One Request and one Response, each a union with one alternative per operation and its answer.

ServiceSocketMethods
Operatoroperator.sockCall(Request) returns (Response), unary; Watch(Request) returns (stream Response), server-streaming
Shellshell.sockConnect(stream Frame) returns (stream Frame), bidirectional

Which method carries an operation follows from the shape of its answer:

OperationCallWatchConnect
plugin.*, unit.*, read✓✓
subscribe, log.follow✓✓
log.query✓✓

An operation issued on a method that cannot carry it is refused operation.malformed.

The frame​

DirectionA frame carries
client → Corethe call identity, chosen by the caller and unique within the connection; and either a Request or a cancellation naming a call in flight
Core → clientthe call identity, and one of: an answer (a Response), an event, a refusal, or a completion
  • The correlation is a field of the frame, never a property of the transport. On the operator projection there is nothing to correlate, so the field is the shell projection's alone.
  • Every call ends with exactly one completion frame, whether it delivered one answer, many, or a refusal.
  • A refusal is a frame and does not end the connection. It carries the same code, message and detail a transport status would.
  • A duplicate call identity is refused operation.malformed, and the call it names is untouched.

The opening frame is the Core's, sent before anything the client asked for:

It carriesSo that the client can
the connection identityrecognise itself in a read of connections, and in the connection.* events
the actor the channel establishedshow whose name will appear on what it does
the call identity of the standing subscriptionreplace its filter, or cancel it
the contract version this Core speaksfail early rather than at its first operation

The standing subscription's call identity is the Core's; a client that reuses it is refused as a duplicate.

Ordering​

PreservedNot promised
the frames of one call, in the order the Core sent themany order between two calls on one connection
events about one subject, in the order they happenedany order between an event and a call's answer

A client that needs an answer and an event in order reads the event's cause.

The version​

StatementWhereChecked
the package version of the protocol definitionsthe definitions themselvesby the build of every party
a version integera field of every Requeston every call, and on a connection's first frame

On a connection the version is checked once and may not change; a frame that restates it differently is refused compat.unsupported. A version is refused, never negotiated.