IOTDB worldview vs EVRTHNG

So just taking these as examples (make sure to add Accept: application/json)

http://devices.webofthings.io/pi/sensors/

  "humidity": {

    "description": "A temperature sensor.",

    "frequency": 5000,

    "name": "Humidity Sensor",

    "timestamp": "2015-06-02T16:06:26.398Z",

    "type": "float",

    "unit": "percent",

    "value": 40.2

  },

>From IOTDB's POV, there's a bunch of stuff being mixed together here:

The model, comprising the values: description, type, unit
The metadata, comprising the value: name, frequency
The ostate, comprising: timestamp, value

In IOTDB world, the value record would look something like this:

{
 "@context": "...",
 "value": 40.2,
 "timestamp": "2015-06-02T16:06:26.398Z",
}

@context is JSON-LD magic to provide meaning to "value" and "timestamp",
defined in the Model (@vocab may be needed too, JSON-LD needs some
tightening).

The Model is then basically static, and the part that defines value e.g.
looks like this

{
 "@id": "#value",
 "iot:unit": "iot:float",
 "iot:purpose": "iot-attribute:sensor.humidity",
}

A lot of those iot: can be taken out, but you get used to it.

Metadata is less frequently changing data and is to taste, but you'll note
that the value will only reference the Model, not the Metadata.
Furthermore, Metadata will typically draw it's definitions from the core
vocab, rather than having to be defined on a case by case basis.


D.

Received on Tuesday, 2 June 2015 23:51:03 UTC