We collect data from 10 sources every second. I'm trying to think of a way to store the data in memory that would allow me to get data like "Every point of data from 12:01 to 12:02".
I've thought about using a tree of some sort or a sorted list. The key would be the time collected and the value would be an array of the measurements. I can't think of how to say "Give me all values for keys in this range". I can only think to use the sorted nature of these structures to quickly get the values for a certain key.
Will I need to calculate the appropriate keys (12:01:00, 12:01:01, ..., 12:01:59) and pull each of those values independently or is there some way I can utilize a sorted data structure to get all my data at once?