Measurement Engine¶
Purpose¶
The Measurement Engine stores measurements submitted by engines associated with timestamps. These measurements could be used by various protocols. For example, the Networking Machine could use latency measurements to make routing decisions.
State¶
Messages Received¶
RecordMeasurementRequest¶
Add a measurement performed by an engine to the measurement database.
Reception:
Records with fields:
Measurement Query
: MeasurementQueryV1
The query that needs to be executed to record the measurement in the database.
Triggers
Records with fields:
Measurement Query
: MeasurementQueryV1
The query that needs to be executed to record the measurement in the database.
Success Operation
: SuccessOperationMeasurementDBV1
The success of the operation, indicating that the KV-pair was deleted successfully or not.
SubscribeMeasurementRequest¶
Subscribe to a measurement key in the dynamic configuration KV-store to get notified when the corresponding value changes.
Reception:
Records with fields:
Measurement Query
: MeasurementQueryV1
The measurement query the subscriber wants to subscribe to from the measurement database.
Triggers
SubscribeMeasurementResponseV1
Records with fields:
Measurement Query
: MeasurementQueryV1
The measurement query the subscriber is now subscribed to.
Success Operation
: SuccessOperationMeasurementDBV1
The success of the operation, indicating that the subscription attempt succeeded or failed.
Epoch Timestamp
: EpochTimestampV1
The wall clock time of the moment that the subscriber was subscribed to this query.
Notifications Sent¶
MeasurementChanged¶
A notification is sent when a new measurement is recorded in the measurement database.
Records with fields:
Measurement Query
: MeasurementQueryV1
The measurement query the subscriber is subscribed to (from the measurement database).
Measurement Query Result
: MeasurementQueryResultV1
The measurement value from the query the subscriber is subscribed to.
Epoch Timestamp
: EpochTimestampV1
The wall clock time of the moment the value was recorded.
Message Flow¶
sequenceDiagram
Any Local Engine ->>+ Measurement Engine: RecordMeasurementRequest
Measurement Engine -->>- Any Local Engine: RecordMeasurementResponse
Any Local Engine ->>+ Measurement Engine: SubscribeMeasurementRequest
Measurement Engine -->>- Any Local Engine: SubscribeMeasurementResponse