SPA webapp for plotting data with angular and python
<p>I want to write an app for plotting various data (cpu, ram,disk etc.) from Linux machines.</p>

<p>On the client side:
Data will be collected via a <code>python script</code> and saved to a <code>database</code> (on a remote server) eg.: In each second create an entry in a <code>mongodb</code> collection with: session identifier,cpu used, ram,iops and their values. This data will be written in sessions of a few hours (so ~25K-50K entries per session)</p>

<p>On the server side:
Data will be processed having the <code>'session'</code> identified, plotted and saved to a <code>cpu graph png/ram graph png</code> etc. Also it will write to a separate collection in <code>mongodb</code> identification that will be used to gather and present this data in a webpage. The page will have the possibility to start the client on the remote machine.</p>

<p>Is this approach optimal? Is there a better but simple way to store the data ? Can I make the page construct and display the session dynamically to be used for example to zoom. Will mongo be able to store/save hundreds of millions of entries like this ? </p>

<p>I was thinking on using  <code>angular + nodejs</code> or <code>angular + flask</code> on the server and mongodb. I don't know flask or node, which will be easier to use for creating a simple REST.</p>

<p>My skill levels: python advanced, javascript/html/css medium, angularjs 1 beginner. </p>

<p>I don't see a problem with your approach except that because you have real-time data, I would encourage you to go with some kind of WebSockets approach, like Socket.io on Node and the front end. The reason why I say this is because the alternative approach, which is long-polling, involved a lot of HTTP traffic back and forth between your server and client, which is a performance bottleneck.</p>

<p>Angular is perfectly fine for this, as you will not need to manually update your model data on the front end, thanks to two-way data binding.</p>

<p>There are many charting frameworks and libraries like D3.js and HighCharts that can be plugged into your front end to chart your data, use it according to your liking. </p>

python angularjs mongodb