Right way to plot live data with django and bokeh

后端 未结 3 1702
醉酒成梦
醉酒成梦 2021-02-19 08:20

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.p         


        
3条回答
  •  庸人自扰
    2021-02-19 08:38

    In my opinon it's okay to use something like a heartbeat-timer in your frontend which triggers a data fetch every second or so. Especially if you implemented caching on the backend.

    A more sophisticated version could use something like django channels to handle the communication via web sockets.

    I would say it depends on the maturity of the project.

提交回复
热议问题