The families
Every message between a unit and the Core belongs to one of eight families, and the family says who may send it and what it means. The Core instructs and asks; the unit acknowledges, answers and reports. Health and events are reports the unit sends on its own. Data flows only on a stream the Core activated, on that stream's own transport. The set is closed: a message that is none of the eight has no place in a Session. This page gives each family's direction, what an acknowledgement and an error promise, the order messages keep, and what an event and a health report carry.
The eight
| Family | Answers | Sent by | Shape |
|---|---|---|---|
| session | open, close, revoked | both | three messages |
| control | what should this unit do | the Core | occasional |
| ack | what became of that instruction | the unit | correlated, at least one per command |
| query | what is this unit's answer to a question | asked by the Core, answered by the unit | correlated |
| data | what it is producing | the unit | continuous, on the stream's own transport |
| health | is it alive, and how well | the unit | periodic |
| event | what just happened to it | the unit | sporadic |
| error | what went wrong | either side | exceptional |
Control and query are asked for by the Core; data, health and events are reports; acknowledgements and query answers are answers.
Direction
| Family | Unit → Core | Core → unit |
|---|---|---|
session OPEN, CLOSE | ✓ | |
session REVOKED | ✓ | |
| health | ✓ | |
| control | ✓ | |
| ack | ✓ | |
| query question | ✓ | |
| query answer | ✓ | |
| data | ✓ | |
| event | ✓ | |
| error | ✓ | ✓ |
Direction is checked before meaning: a control message from a unit is refused for being that, whatever it contains.
Acknowledgements
| Outcome | Means | Then |
|---|---|---|
accepted | the unit has the instruction and the work is under way | at most one done or failed |
done | the instruction is carried out | nothing: the exchange is over |
failed | it could not be carried out | nothing: the exchange is over |
- One acknowledgement when the work is quick; two when it outlasts the wait a caller is given.
- The Core answers the caller with the first acknowledgement it receives. A final one after
acceptedcloses the exchange and reaches no caller; a unit whose outcome matters to someone reports it as an event. - An acknowledgement carries a line for a person and no domain result. Results are answers, and answers travel in the query family.
An error that answers
- A unit that answers an instruction or a question with an error has answered it: the exchange closes, and whoever asked is told at once.
- On the administrative and interface surfaces, the caller is refused with
unit.failed, carrying the unit's own code and message. The Core does not read or grade the unit's code. - An error correlated to nothing the Core is waiting on is recorded and goes no further.
One order per channel
Everything on one channel arrives in the order it was sent, across families: on the Session an acknowledgement cannot overtake the health report sent before it.
There is no order across channels. A data message travels on its stream's own transport, so it and an error about it are unordered; the error's correlation names the message it is about.
Events
The event family is where a unit declares a severity.
| An occurrence carries | |
|---|---|
| the occurrence class | a name the unit declared and was granted |
| a severity | 0–99, declared by the unit and carried unchanged |
| a line | for a person |
| a detail | opaque: the Core never reads it |
- An occurrence class the unit did not declare, or was not granted, is refused.
- The severity a unit attaches does not widen what it may report.
- The Core publishes it as the event
unit.occurrence.reported, with the class in the event'soccurrencefield and the detail in itsdetail, unchanged.
Health
A health report carries three things.
| its arrival | that the unit is answering |
| a grade | 0–99, on the same ordered scale as an event's severity |
| a line | for a person |
- It names no dimension — no throughput, no latency. In what respect is what an event says.
- A report becomes the unit's observed condition, beside its state. It never changes the state: a unit
grading itself ninety is still
Running. - No report means no condition, which is not the same as a report grading itself zero.
- Liveness comes from reports arriving on the interval the Core assigned.