observer-service icon indicating copy to clipboard operation
observer-service copied to clipboard

Synchronised sampling

Open balazskreith opened this issue 2 years ago • 0 comments

Description

Clients sampling and sending samples async by default behavior.
A feature request is to inform the connected clients when to sample. In this case matched tracks from clients can be more aligned in terms if received bytes, packets, etc. The feature would look like a config option for websocket source, where it could be setup what is the sampling period. the observer would calculate the sampling period and each time it receives a sample from a client it would send back as a feedback message what is the next sampling time and sequence number. The client should sample at the time the observer requested and assign the sequence number the observer gave.

Background

Though sampling in a normal cases should be async and back channel communication should be as low as possible, there are situation like testing environment where this feature could make sense. In testing environment where the network conditions have to be sampled in a 500ms - 3s accuracy and evaluate the results this can make sense as measurements from synchronized samples are more accurate to sum.

Solution

As a control message feedback, the observer could send the next sampling time as an abs timestamp.

balazskreith avatar May 11 '22 17:05 balazskreith