AngularJS dealing with large data sets (Strategy)

Posted by Brian on Programmers See other posts from Programmers or by Brian
Published on 2013-11-05T20:54:43Z Indexed on 2013/11/05 22:11 UTC
Read the original article Hit count: 174

Filed under:
|
|

I am working on developing a personal temperature logging viewer based on my rasppi curl'ing data into my web server's api. Temperatures are taken every 2 seconds and I can have several temperature sensors posting data. Needless to say I will have a lot of data to handle even within the scope of an hour. I have implemented a very simple paging api from the server so the server doesn't timeout and is currently only returning data in 1000 units per call, then paging through the data. I had the idea to intially show say the last 20 minutes of data from a sensor (or all sensors depending on user choices), then allowing the user to select other timeframes from which to show data. The issue comes in when you want to view all sensors or an extended time period (say 24 hours).

Is there a best practice of handling this large amount of data?

Would it be useful to load those first 20 minutes into the live view and then cache into local storage something like the last 24 hours?

I haven't been able to find a decent idea of this in use yet even though there are a lot of ways to take this problem. I am just looking for some suggestions as to what might provide a good balance between good performance and not caching the entire data set on the client side (as beyond a week of data this might not be feasible).

© Programmers or respective owner

Related posts about data

Related posts about caching