The two projections
One administrative contract is carried in two shapes of exchange. The operator projection is a call and its answer, for a command that runs, prints and exits, or for a script. The shell projection is a connection held open, for a person who stays connected and sees events arrive between commands. The operations are the same on both, with the same limits; what differs is what a connection remembers between calls. This page gives what differs, what does not, how answers and events are told apart on a held connection, and which projection a client speaks to.
What differs
| The operator projection | The shell projection | |
|---|---|---|
| Address | operator.sock | shell.sock |
| The exchange | one operation, one answer; or one operation whose answer is a stream | one connection carrying many calls, and the events that arrive while it is open |
| What accumulates | nothing between calls | the established actor, the subscriptions taken, the correlation of calls in flight |
| A subscription is | an operation whose answer is a stream | the default: one stands from the moment the connection opens |
| It ends when | the answer arrives, or the caller closes the stream | the transport closes, or the Core stops |
- Nothing about a held connection is persisted. A Core that restarts ends every connection it had. There is no reconnection token and no resumption of a call in flight; a client that returns opens a new connection, receives a new identity, and its standing subscription begins with a fresh snapshot.
What does not differ
| Differs | Does not differ |
|---|---|
| the shape of the exchange: one answer, a stream, or a connection | which operations exist |
| whether a subscription is standing or taken | what a subscription promises |
| how a refusal travels: a transport status, or a frame | the code, the message and the detail in it |
| who may reach the address | what a caller who reached it may do |
- The same operations, with the same limits, on both. There is one operation union, and each projection is a way of carrying it: an operation is a member of the union, never of a service, so an operation cannot exist on one projection and not the other.
- A held connection adds no operation. What it carries beyond a call is connection state: an identity established once, the subscriptions taken, and the correlation of what is in flight.
On a held connection
Three things arrive on one connection, told apart mechanically:
| Carried by | |
|---|---|
| a call's answer | the call identity the caller chose, echoed on every frame of that call |
| an event | the call identity of the subscription that selected it — the standing one unless the caller took another |
| the end of a call | an explicit completion frame carrying that call identity |
- The call identity is the caller's, never the Core's. A caller can match an answer without having recorded anything the Core told it.
- Every call completes explicitly. A call answered by one message completes with it; a call whose answer is a stream completes when the caller ends it or the Core does, and the completion says which. Silence always means not yet.
- Cancelling a call in flight names its call identity and belongs to the connection that issued it. On the operator projection the same act is closing the stream.
Which projection a client speaks to
It is decided by who remains on the other end, not by who typed.
| The client | Speaks to |
|---|---|
| a person typing a command that runs, prints and exits | the operator projection |
| a person who asks to be connected to a deployment and stays | the shell projection |
| a script, a supervisor, a panel's back end | the operator projection |
The manager's commands against a running instance are single acts, so the manager is an operator-projection client whoever invoked it.