Stream lag behind

Hello,

using stream at high rate (more than 20 Hz), the client starts lagging behind. For instance, moving a slider is not triggering on the server for a while, but will eventually if I reduce the rate. I can group data in stream to mitigate the problem.

But what I would really like is find out when the client is lagging behind, so to reduce the rate on the server side. But I can’t seem to find a way to do it. Something like a ping sent from the server and when response does not come back immediately, I know that the client starts lagging. I know that it is possible because that is what bokeh does, but not sure how.

suggestion welcome
Mat

@chupach1 Bokeh does not currently have any sort of back-pressure reporting mechanism. Unfortunately, I don’t have any suggestions offhand, but please consider opening a github issue so we can start to discuss what something like that might look like.

Hello Bryan,

I found a quite simple way to test back pressure with a phantom checkbox button that is set to inactive in its attached CustomJS, while a periodic callback set it to active. When they match, it means that the client is lagging behind.

The way to handle the situation will likely be very specific so I am unsure that a curing mechanism should be implemented in bokeh

Thanks

1 Like