Liveness
In connection-less communication, the existence of the receiving endpoint is unknown. However, some actions may require that the receiving endpoint is still active. In addition, some communication protocols require the exchange of periodic messages to maintain the connection. The Liveness service provides the means to monitor the liveness of a Component or maintain a connection between two Components by specifying the interface for establishing the exchange of small, periodic messages between two Components. This message exchange can be used to maintain a connection or verify that a Component is still active.
A Liveness client is responsible for sending the QueryHeartbeatPulse
message to (or create an Event with) a Liveness server to trigger the sending of a ReportHeartbeatPulse
message. The reception of the ReportHeartbeatPulse
message indicates that the Component hosting the Liveness server is still active.
As such, the Component that wants to monitor the liveness of another Component is the Liveness client, and the Component that is being monitored is the Liveness server.
Example
If Component A wants to monitor the Liveness of Component B, Component A acts as the Liveness client and Component B acts as the Liveness server. In addition, in order to monitor the Liveness of Component B, Component B must allow such monitoring by implementating the Liveness service.