douqin7086 2016-09-10 23:10
浏览 116

来自Windows服务器的mysql在线仪表板

I need to create online dashboard using data from SQL database from windows server 2012. This dashboard should contain charts, and should be able to autorefresh data.

My biggest problem is how can I make an access to that SQL file (which is around 600mb) from windows server.

Making php based charts is not a big deal, also I have found plenty online services that are offering online charts, but my problem is how can I connect it, because, I can copy database, and make a chart from it, but it needs to be a "live" connection between win server and that website where I'm gonna place dashboard, becuase it's the only way to make autorefreshed chart (at least I think it is). I have also thought to autosync it with dropbox and then somehow make a connection with dropbox, but I think that's not possible. Any help will be highly appreciated.

  • 写回答

1条回答 默认 最新

  • duanqiao1926 2016-09-13 15:17
    关注

    Ok, I believe what you are looking for is some sort of architecture advice. So, let me try to help you.

    First, you don't "refresh dashboard when the database is changed" (there's no way SQL will call some code on update), but rather create some methods at the back-end which do both: change the database and communicate with the front-end; and change your database only using them. Like:

    function changeMyDB($options) {
        // do some actual changes and if that doesn't fail,
        // notify the user
    }
    

    Second, you need to understand which way to use to communicate with the user (how to "notify" them from the back-end when they don't do any request). Well, here you have 2 options. More straight-forward way is to use web-sockets (better to use with FastCGI than CGI, as far as I know) and the other (less proper I think) is to regularly send requests from the front-end to the back-end and refresh if there's pending updates which you will register with your changeMyDB function. Also I've heard about pusher in this context couple of times, but I never really gave some time to realize what it actually is.

    评论

报告相同问题?

悬赏问题

  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法
  • ¥15 如何绘制动力学系统的相图