Aerospike historical data and trend analysis


#1

My requirement is to store historical data for a column for a specific date and use it for trend analysis. How can this be achieved in aerospike.


#2

For time series data, if you want to store an entry to a record, you can create a bin ( column ) to store timestamp, other bins for data, and then create a secondary index on this bin ( column ), then you can use query to get your timestamp and data, this is the simplest way. Another solution is store multiple entries into a record as a block, this solution make you merge a batch entries into one block. In this block, you can use sorted map or sorted list, please refer to http://www.aerospike.com/blog/modelling-time-series-data-top-performing-stocks-aerospike-using-sorted-maps/. You also can serialize the data into a binary, then put this binary into a sorted list. All solutions can work, it depends on your requirement and Aerospike limitation.