Skip to content

Realtime Events (SignalR)

Live updates travel over one SignalR hub at /hub/realtime. Authentication uses the same JWT as the REST API, passed as ?access_token=<jwt> (or an Authorization header).

High-frequency streams are opt-in per group, joined only while a consuming screen is mounted and re-joined automatically on reconnect:

GroupCarriesConsumed by
sensorsLive sensor reading batchesRealtime Monitor
predictionsNew prediction batchesDashboard charts
logsFull log stream (all levels)LogViewer page only
alertsWarning/Error log entries onlyNotification bell, app-wide

The alerts group exists so warnings surface everywhere without streaming the full logs firehose to every dashboard.

EventPayload highlights
SensorReadingchannelIndex, value, timestamp
NewPredictionpredictions, confidenceScores, modelId, inferenceTimeMs, window timestamps (below)
InferenceStateChangedstateidle · ready · running, active datasource, loaded model — emitted on every lifecycle transition
InferenceFaultedreason, datasourceId — also raises the blocking fault banner
HealthMetricsUpdateCPU/GPU/memory, uptime
ModelActivatedmodelId, version, shapes, file size
ModelUploadProgressUpload/validation phases, error message if failed
OutputWriteFailedCoalesced per sink — immediate first alert, then one per 30 s window
LogEntryAddedLog entry (level, message, logger, metadata)

A prediction describes a past window of input. All timestamps are Unix epoch milliseconds from one clock — the backend stamps each sample once at read time, and that value is echoed through the pipeline, never regenerated:

FieldMeaning
windowStartTimestampOldest input sample in the window
windowEndTimestampNewest input sample — the “as-of” time the prediction is valid for
timestampMirrors windowEndTimestamp (compatibility)
emittedAtBackend wall-clock at emission — emittedAt − windowEndTimestamp ≈ end-to-end latency

On the dashboard the prediction trace visibly trails the sensor trace by the real pipeline latency. That gap is an intended operational signal, not a rendering defect.

Slow consumers never throttle inference: dashboard broadcasts are fire-and-forget, and events to a client that can’t keep up are dropped and counted (/api/inference/backpressure). Notification-worthy events are deduplicated and rate-limited to keep the bell useful — see Notifications.