I am looking for the best mechanism to store a bunch of environmental data and like the concept of a round-robin database (rrd) to cap the size of the database. This will be used for a Java Web-app so I am more keen on using Java based technology. The tool I have been looking at is JRobin and RRD4J
However, it appears RRD is designed to store data at fixed interval. Is this correct?
The data I am looking to store are temperature, humidity, event driven data such as door open/clos开发者_如何学Goed, dry contact open/closed.
Temperature and Humidity data can be polled, but the hardware also send updates to us which is based on when the hardware detects a change (so not regular-interval). I would also like to store this as well.
Event-driven data will not be polled and will only be stored when the sensor send us the data.
To summarize, my question will be 2 folds:
- Can RRD tools be used to store non-regular interval data?
- If RRD tools cannot be used to store non-regular interval data, any suggestion on how to store non-regular interval data in a way which the storage mechanism automatically caps the size of the data store?
You might find some relevant info in the reasons why the Graphite project wrote their own RRD clone (called whisper): http://graphite.wikidot.com/whisper It seems to be for the reasons you mention.
One thing I might suggest here is to use StatsD https://github.com/etsy/statsd which while isn't written in Java, does have a Java interface and is used successfully for thousands of different stats at Etsy. It plugs into Graphite (http://graphite.wikidot.com/) which then stores the data for you and generates graphs. Since the graphs are all accessible via URL it might be the case that you don't need a pure Java solution.
精彩评论