OK. I would try to use Coherence or Hazelcast to implement your use case. Both support range queries and indexing. Hazelcast is open source, Coherence is not.
I have not seen Coherence installed on a Raspberry Pi, but apparently Hazelcast can be:
https://oracleus.activeevents.com/2013/connect/sessionDetail.ww?SESSION_ID=7...
Caveats: 1. I have never used Hazelcast myself (I am aware of it as a competitor to Coherence). 2. I have used Coherence lots and it rocks (but I am somewhat biased, given that I work for Oracle and Coherence was one of the products I specialised in).
If you want to go for a store that does not provide indexes out of the box, then you can create your own "index views" - create an index key corresponding to a particular time slice (say) and in that store a collection of the real keys for all the readings in that time slice.
HTH,
Ewan
On 13 October 2014 12:25, Mark Rogers mark@quarella.co.uk wrote:
On 10/10/14 21:10, Ewan Slater wrote:
what are the natural keys for your data (you may have a key with two or three components)?
I guess timestamp and "name" (eg temperature, humidity).
- how you are going to access the data (if you're always searching for
time stamp, it might make sense to include this in the key)?
What I'm going to need are:
- Latest values (with their timestamps so I know how current they are)
- All values in a date range (eg to draw a graph)
- whether the system that you're using supports indexing / value
extraction,or some other mechanism that avoids searching through the whole store to find a particular value ("full table scan").
That effectively brings me full circle to where I started, which is to be asking which system I should be using! I'd say I want something pretty flexible, although not as flexible as an RDBMS. The brief research I've done on memcached storage systems suggests that if I know the key I can get the value pretty much instantly, but I've not really found any thing that indicates how (or indeed if) I can search for keys matching some criteria, and how fast that would be. If, for example, it's possible to extract values for keys matching a regex then I could probably construct something pretty useful out of that.
Mark
-- Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450 Registered in England (0456 0902) 21 Drakes Mews, Milton Keynes, MK8 0ER
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!