Architecture
How Miravo moves data one way, from content files through the scheduler, generators, and asset graph to the event bus and protocol adapters.
Technical details
The one-way flow
Miravo compiles content once. The runtime evaluates state on each tick. The same graph feeds the adapters, the Console and Admin API, and persistence.
Subsystems
The WebSocket stream also carries runtime:tick messages with member deltas, core counters, and adapter metrics.
Adapters never compute member values. They project the graph they receive. Value generation stays in the runtime.
Reference
| Event or metric surface | Notes |
|---|---|
tick:complete | Carries { tick, simulationTime, graph, delta } |
asset:created / asset:removed | Runtime asset added or removed |
lifecycle:changed | Carries assetId, the stage transition, and operating hours |
asset:maintenance | Carries assetId, from, to, operating hours, and reason (manual or scheduled) |
fault:triggered / fault:cleared | Fault lifecycle events |
engine:error | Carries error and context. Counted in engineErrorsCount, kept as core.lastEngineError (context, message) in /api/metrics, logged once, and stored in the event history as engine:error (miravo logs --channels engine) |
engine:warn | Carries message and context. Context tick-overrun increments tickOverrunsCount, not engineErrorsCount |
runtime:tick counters | memberValueCount, uptimeMs, actualTicksPerSecond, quarantinedAssetCount, engineErrorsCount, tickOverrunsCount, circuitBreakerTripsCount |
| Adapter contract | Receives graph snapshots and publishes protocol-specific projections |
tickOverrunsCount counts wall-clock ticks that took longer than overrun_threshold_multiplier (default 1.5) times the tick interval. It is a warning, not an error. Simulated values stay correct because time advances by simulated seconds, not wall ticks. A single overrun, such as a GC pause or a busy host at high --speed, is harmless. Investigate when it climbs steadily: reduce assets, raise --tick, or lower --speed. A non-zero engineErrorsCount is different: read core.lastEngineError or run miravo logs --tail 100 --no-follow --channels engine.
Related pages
Concepts
Authoring and runtime terms.
Persistence
What survives a restart.
CLI ⭢ miravo status
Read live runtime state and metrics.
CLI ⭢ miravo logs
Stream events and runtime output.
Was this page useful?
Last updated on
Miravo