Skip to main content
Version: 0.15.0

Level and edge

A consumer will miss events, and every event type says how the consumer gets back to a correct picture. A level announces that a current value changed, such as a unit's state, and a fresh snapshot recovers it. An edge announces an occurrence that leaves no trace in the current picture, and the log store keeps it. The class is declared with the type, and between the two nothing is lost in silence. This page gives the two classes, the rule that joins each to its recovery, and how an operator's decision is kept apart from an observation.

The two classes​

ClassAnnouncesRecovered by
levelthat the current value of something changed — a unit's state, a channel's attachment, a plugin's policyresynchronising: a fresh snapshot makes a consumer correct again
edgean occurrence that leaves no trace in the current picture — a document that failed validationreading: 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.

DirectionHolds whenA failure would be
level → snapshotevery level type's subject is a kind the snapshot carriesa subject a resynchronised consumer is silently wrong about
edge → log storeevery edge type is written to the log store as it is publishedan 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​

PublishedKeptBudget
an observation — a unit's life, a channel's occupancy, a connectionyesas a log entryunder the log store's retention
a decision — an operator changing what a plugin may doyesas an audit record beside the policy it changed, in the Registrynone

One type is a decision, plugin.policy.changed; every other type is an observation. See the catalogue.