I am trying to create a time series application, where the client application continuously connects to the server to get the recent statistics and plot the graph from it. Like say for say for every 30 seconds it requests for the statistics for something and then gets the data and plot the results in a nice graph.
I don't want the graph to be discontinuous. I mean I want the graph to be constantly updating showing the time series statistics. Something like shifting to the left and displaying the new one from the right in the graph. What is the right approach for this.
I am not sure but should I fetch the data from the web server. I mean I was planning to use a web server which can provide the recent stats. I am not sure should I use http or use sockets to make a constant connection from the client and access stats. I was thinking to create a web server using node.js and the clients requesting for stats every 30 sec or so.
Can you guys suggest what could be the best architecture for this? Are there any library for plotting this time series data. I mean I can use some to plot a static graph. But I want this graph to be constantly updated showing the recent stats.