Heartbeat
Heartbeat
The heartbeat (HB) feature in VIS ensures that both the system and critical integration components—such as IO cards—remain responsive. While VIS is self-aware and can detect internal states of functionality, it may not be able to notify external systems (the "listening party") if the integration layer fails or if there is a major system-wide malfunction. To address this, the heartbeat periodically sends a signal (bit) to the listening party. If the heartbeat signal fails to arrive, the listening party can infer a failure and take appropriate action—such as halting operation or triggering a fail-safe response.
Purpose
The heartbeat serves two distinct but related purposes:
- External signaling: A bit-level toggle is periodically transmitted to the IO module to signal ongoing healthy operation.
- Internal liveness check: VIS monitors individual Vislets (processing pipelines) to determine if they are still functioning. If no output is received from a Vislet during a heartbeat interval, that Vislet is considered non-functional or "dead."
Behavior
- After each frame is processed by a Vislet, the output is sent to a shared pool. As long as messages are received from a Vislet during the heartbeat interval, it is assumed to be alive.
- If a Vislet stops its grab → detect → interpret → emit loop, it stops sending messages. The heartbeat component detects this and marks the Vislet as unavailable.
- When at least one Vislet is marked dead (depending on configuration), the heartbeat signal to the IO module may stop, indicating a system-level failure.
Auto-Resurrection
If a Vislet becomes responsive again, the heartbeat automatically resumes. This behavior is not configurable—any recovered Vislet re-enables its contribution to the heartbeat mechanism without requiring manual intervention.
Configuration
The heartbeat supports two configuration parameters:
- period (
int): The interval in seconds between each call to thetogglemethod. Default is5seconds. - partial_death (
bool): Determines how strictly the system interprets Vislet failures.- If
false(default): The system declares death if any Vislet is lost. - If
true: The system tolerates partial Vislet failures and continues operation unless a broader failure occurs.
- If