As part of my interest in IoT and Home Automation I spent some time looking for a non-destructive alternative to rrdtool for long-term storage and aggregation of sensor data. The search did turn up a few alternatives, particularly OpenTSDB, but I was not especially impressed with its performance nor its complexity. During the search I came across Flot, which is a JavaScript library for plotting graphs client-side in a browser, and the idea for a “Web2.0” time-series database was hatched.
Timestore, which is the result, is written in C and accessed via an HTTP API that can feed data series directly to Javascript via AJAX calls. It is designed to be lightweight, fast, and to retain all data. Like most equivalent tools it can decimate on inserts, so queries for aggregate data take constant time regardless of the time-scales involved.
The design has optimisations for sensor applications, where a single device may report multiple data items at each time point. These can be submitted in one go, but queried as separate series for display. The modular architecture will enable alternative access methods to be added; MQTT being an obvious one which I intend to look into for data submission.
Code and documentation can be found on the project’s github page. There are some hosted examples to play with, including the graph embedded above, which is real temperature data and can be zoomed by dragging a box around a range. Double-click to zoom back out. The software is released under GNU AGPLv3.