0

Our dashboard has three relatively data-hungry plots:

  • two image plots (200x200x3)
  • custom extension tool plot (200x200x4).

We 'update' (send data to) them from doc.add_next_tick_callbacks. We are hitting a weird situation where the image plots appear to be working for a split second and then a websocket message comes which erases everything in their buffer.

We traced frontend and backend and it seems that:

  • frontend gets initialized with empty buffers (good)
  • frontend sends a PATCH-DOC back with empty buffers
  • in the meantime the actual-data update arrives from the server (which makes images work for a split second)
  • finally the empty PATCH-DOC gets pinged back to frontend resetting our figures.

We did extensive reading of the frontend codebase, and found that when we removed

this.send(patch_message)

from connection.ts line 166, our problem is gone.

What could be causing this ping/pong behaviour?

Could this be a bug or did we do something wrong?

Tested on Bokeh version 1.0.4

David L
  • 21
  • 4
  • Seems like a bug. However, I have not seen anything like that reported, and realistically there is zero chance we can investigate without a complete minimal reproducer. – bigreddot Mar 05 '19 at 00:10
  • How do you obtain the data that you sent to the plots? Are you making synchronous calls inside a Bokeh periodic callback to get that data? The best practice is to have a separate thread filling the data-bucket that Bokeh periodic callback can access and use it. And are you sure you are not mixing the plot's ColumnDataSources or you don't send data that have different length than expected? Are there any error messages in browser's console (e.g Developer Tools in Google Chrome)? – Tony Mar 07 '19 at 11:40
  • There are no errors in the dev console. We will have to produce a minimal example as @bigreddot suggested. Maybe it is even because of our custom plot, but currently we are focusing on something else, so this might take some time. – David L Mar 08 '19 at 12:06

0 Answers0