I am working on a Bokeh web application. It is a dashboard with 18 graphs, most
of them containing hundreds of data points, which are built once the user opens
the page with a web browser and then updated periodically using
ColumnDataSourche.patch(). The goal is to visualise data in real-time.
When updating the graphs, I am experiencing delays of several seconds to more than a minute between the point in time when
ColumnDataSourche.patch() is called and when the graphs in the browser show the patched data.
I figured out that the Bokeh server communicates with the browser using a web socket. I used the debugging tools of the browser (Firefox) to inspect the messages that are exchanged; the sizes of these messages does not seem to be that high that the internet connection bandwidth (50 MBit/s) could be the bottleneck.
My question is, how can I reduce this delay; for example, do you know certain Bokeh configuration parameters which I could use? Like I said, it can be higher than a minute sometimes, which does not allow for real-time application.
I also noticed that, if the delay reaches a certain point, which is around 20 seconds, it keeps increasing to a minute and more. I am suspecting that my program calls
ColumnDataSourche.patch() at a higher frequency than the messages can be delivered to the browser so the web socket messages are stacking up in a queue inside Bokeh. Do you think this could be the case, and if so, is there a way of dropping them after some time?