Streaming embed document?

Hi !

I’m pretty new to this and i wanna know if there is such a solution to my issue

Actually i’ve got a Client coded in Javascript (React)
I also have a server which is written in python and contains raw data (actually on a distant database but nevermind)
For now, they both communicate with a websocket connection.
My client ask my server multiple parameter/graph configuration
My server sends back those parameter/graph configuration and MUST update them as new data arrives in database. Thus the process is like this (for each of the plot my client ask):

1: Client choose a parameter/graph to visualize (he can add/remove/move those graphs by React)
2: Server get and format the data based on the received message sent by 1. (websocket connection)
3: Server creates a Bokeh plot
4: For each Bokeh Plot (3.), server sends them back in a standalone document to ReactJS (websocket connection)
5: React display those graphs into the dashboard

Right now, everything is working well except that each time my server wants to update the graph, it makes a new html Bokeh standalone document.

My question was, is it possible to make from a javascript based client and a python backend with websocket a bokeh plot with streaming capabilities ?

Can I second this question.

I am not really comfortable with JS and am happy with Python but our dashboard design is possibly sending us down the path of AWS Amplify + React + Lambda (Bokeh) which is probably a bit of a miss as far as original design goals of Bokeh are concerned but would be pretty cool if I could get it working.

I have found some excellent articles that provide useful pointers but thus far they seem to rely on JS callbacks rather than firing native Python callbacks on the Bokeh server. Right now I know I could be just way out of my depth in understanding why that just might never work but I thought I’d ask. The React is really mostly about wrapping the dashboard (authentication, lightweight, nav, etc.) and I am keen to stick with Bokeh for plotting. I suspect I might be able to wrap a redirection into the Bokeh server entirely but wonder if there is a halfway option of using the script return from the server in the react template and still managing to fire callbacks on the server side.

With apologies for my lack of fundamental understanding.
Andrew

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.