dongtanzhu5417 2017-06-02 00:08 采纳率: 100%
浏览 172
已采纳

从数据库服务器端创建绘图并在客户端可视化它

I'm currently trying to find the best way of doing this:

We have a python program (client side) we use to upload metrics on a mySQL database on a server and later, via web check it and filter it, etc.

The problem arises when we try to plot any query from to the database. It's unclear to us what aproach to use. The main page was made with Joomla in php.

Currently I was looking into python alternatives to run on the server side, somehow capture the query, process the data, create the image and then return it to the client side as an image or as a string to be reconstructed on the client side. But as I have read it seems also possible (and maybe easier) to do the same in PHP or JavaScript which (as I understand it) run on the client side, leaving less to worry about.

Is it that so? Are my assumptions right? Which aproach would you use/pŕefear? Is there some link or info you could give me to continue my search?

I would prefer to do it on Python using something like matplotlib, plotly, bokeh, etc. but as I see it, the problem is not about creating the image, but about comunicating and sending the image information between server and client.

Thanks!

  • 写回答

1条回答 默认 最新

  • dtg78700 2017-06-02 14:50
    关注

    I think it possible to do what you want to with bokeh. I dont know joomla but it think its not that important.

    • Check out that part of the bokeh documentation Embedding Bockeh
    • then for the server parts in python i would recommend flask to start with.
    • You can just prototype your app with one of the bokeh server apps examples from the bokeh repo.. there are flask examples too.
    • Then you can start to extend the bokeh server app from the examples with a query to your database with sqlalchemy or mysql-flask
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制