i have a bokeh plot embedded in a django app. I create the plot in the django view and push the plot to the bokeh server to show the plot in my webpage.
#view.py
def view_plot(request):
f=figure()
f.plot(#some data#)
session = push_session(curdoc())
context = {'script': autoload_server(f, session_id=session.id)}
return render_to_response('plot.html', context=context)
It all works quite good. Now I want to do a live plot, every time when a new DB-Entry is created the plot should be updated. I'm not sure what is the best way.
Is it a good practice to use a timer on the webpage to ask for now data?
Or is there a way to push the update form the server so that every currently connected client gets the plot update?
I would be very thankful for every hint.
Thanks a lot.