MiravoMiravo

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 surfaceNotes
tick:completeCarries { tick, simulationTime, graph, delta }
asset:created / asset:removedRuntime asset added or removed
lifecycle:changedCarries assetId, the stage transition, and operating hours
asset:maintenanceCarries assetId, from, to, operating hours, and reason (manual or scheduled)
fault:triggered / fault:clearedFault lifecycle events
engine:errorCarries 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:warnCarries message and context. Context tick-overrun increments tickOverrunsCount, not engineErrorsCount
runtime:tick countersmemberValueCount, uptimeMs, actualTicksPerSecond, quarantinedAssetCount, engineErrorsCount, tickOverrunsCount, circuitBreakerTripsCount
Adapter contractReceives 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.

Was this page useful?

Last updated on