Skip to main content

Module store

Module store 

Source
Expand description

Where executions live while this process does: the snapshots, the retained event history, and the subscribers.

Everything is bounded. A store that grew with the work it observed would be this executable’s own memory leak, so the number of retained executions, the number of events kept per execution and the depth of a subscriber’s queue all have a limit, and each limit has a defined behaviour when it is reached rather than an unwritten one.

State moves in one place. ExecutionStore::publish applies an event to the snapshot under the lock, refusing a transition ExecutionState::may_move_to does not allow, assigns the sequence, retains the event and hands it to the subscribers — so a client reading the snapshot and a client reading the stream can never disagree about what happened, only about how much of it they have seen.

Structs§

EventPage
A page of an execution’s retained history.
ExecutionStore
The executions of one process.
Limits
What the store keeps, and how much of it.
ReportOutcome
The outcome of one report from the process that runs an execution.
Seed
What an execution is when it is created: everything about it that does not move.

Enums§

AdoptError
Why an execution was not adopted from a report.
CancelOutcome
The outcome of asking to cancel.
Delivery
What a subscriber receives.
Filter
Which executions a subscriber wants.

Constants§

REPORT_HEARTBEAT
How often a process that runs an execution and reports it to a server says so, at the least, while nothing else happens: the reporter’s heartbeat.
REPORT_SILENCE
How long a reported execution may go without a report before this store stops believing it is still going: fifteen heartbeats. A majordomus run that was killed sends nothing more, and an execution shown as running for ever would be a history no writer reaches.