1

This is a simplified example scenario. I collect interval temperature data from a room's heating, let's say every minute. Additionally, there is a light switch, which sends its status (on/off) when someone switches the light on or off. All events are stored in crate with their timestamps.

I'd like to query all temperature readings while the light switch is in the "on"-state.

My design is to denormalize the data. So, each temperature event gets a new field, which contains the light switch status. My query breaks down to a simple filter then. However, I have only the events if someone presses the switch, but no continuous readings. So, I need to read out all light switch data, resemble the switch's state over time and update all temperature data accordingly.

Using crate, is there a way doing everything within crate using crate's SQL only, i.e. 'in-crate' data updates? I do not want to setup and maintain external client programs for such operations.

In more complex scenarios, I may also face the problem of reading a huge amount of data first via a single client program in order to update afterwards other data stored within the same data store. This "bottleneck" design approach worries me. Any ideas?

Thanks,

nodot

nodot77
  • 11
  • 3
  • Nodot: we think this question might warrant a longer discussion rather than an "answer". Can you ping us in IRC (Freenode) or our Google Group. When we work out the best approach, we can answer here. – Spanky Jan 09 '15 at 22:06
  • just following up with you, see my comment above – Spanky Feb 02 '15 at 14:51

0 Answers0