Level and edge
Every event type belongs to one of two classes, declared with the type. The class says how a consumer that missed an event gets back to a correct picture.
The two classes
| Class | Announces | Recovered by |
|---|---|---|
| level | that the current value of something changed — a unit's state, a channel's attachment, a plugin's policy | resynchronising: a fresh snapshot makes a consumer correct again |
| edge | an occurrence that leaves no trace in the current picture — a document that failed validation | reading: the log store holds it |
The rule
The subject of every level event appears in the snapshot, and every edge event has a durable counterpart as a log entry.
Between the two, nothing is lost in silence. Any individual event may be lost to a consumer; a level is recovered from the next snapshot and an edge from the log store.
| Direction | Holds when | A failure would be |
|---|---|---|
| level → snapshot | every level type's subject is a kind the snapshot carries | a subject a resynchronised consumer is silently wrong about |
| edge → log store | every edge type is written to the log store as it is published | an occurrence nobody can investigate |
- What a snapshot contains follows from the catalogue: the subjects of the level types the filter selects, and nothing else.
- Levels are written to the log store too, though a snapshot recovers them: a record of what happened is kept even where the current value could be rebuilt.
Observations and decisions
| Published | Kept | Budget | |
|---|---|---|---|
| an observation — a unit's life, a channel's occupancy, a connection | yes | as a log entry | under the log store's retention |
| a decision — an operator changing what a plugin may do | yes | as an audit record beside the policy it changed, in the Registry | none |
One type is a decision, plugin.policy.changed; every other type is an observation. See
the catalogue.