couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david martin <>
Subject Re: versioning for sensors data storage
Date Fri, 08 Jun 2012 17:08:02 GMT
On 08/06/12 12:08, Maxim Osipov wrote:
> Hi,
> Warning: I'm new to CouchDB! And I'm in a process pf selecting a
> database to store data from sensors. The scenario looks like this:
> There are sensors on the net (may be thousands or later millions) for
> things like temperature, motion, etc. Each sensors has an IPv6 address
> and pushes data to central server in JSON format, like:
> { temp: 36.6; humidity: 80 }
> We don't know in advance what exactly sensor will push, but most of
> the time the format of JSON structure is the same. Data is updated ...
> say every second for each sensor.
> > From the "architecture" point of view it could be a nice solution with
> CouchDB, where each sensor is represented by a document and each
> sample of sensor data is a version of this document.
Each sample time is represented by a document and each sensor has a field in the document.
If multiple sensors read at the same time different documents are produced for each sensor.
If sensors are all read at the same time multiple fields can exist in a single time document.

Versions have nothing to do with what you are trying to do.
> The questions are:
>   - do we have time/date information for versions
not a viable idea
>   - is it easy/good to access document version history
not for this purpose
>   - what is a limit on number of versions and how it affects performance
arbitrary 1000, but not to be used for this purpose
>   - is it possible/easy/good to get a time snapshot of database
> All other comments are also welcome!
> Kind regards,
> Maxim

381153 minute readings  of temperature data in Couchdb
visualized by couchapp running d3.js
data comes from Nanode #490
some issues with negative degree readings on Nanode.
press Next (not start) to visualize.
You cannot break anything!
records in JSON, date is coded in id

  dt = new Date(parseInt(parseInt(json.rows[0].id.slice(0,14),16)/1000));


David Martin (davidoccam)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message