Posting historical data to Orion Contex Broker with a different date

We found a problem that is important to us and we need to solve before continuing with Orion Contex Broker. In our distributed network, we cannot assume that links are always in order, and sometimes we have historical values ​​explored in the past that we want to click on contex broker as soon as communications are restored. These probes must be delivered to Orion with a set measurement time, and then sent to Hadoop via Cygnus.

After looking at the Orion API, it appears that the published values ​​are considered current, and there is no way to say that they are values ​​examined half an hour ago (for example).

Our doubts:

1) Could there be some way to tell the Broker Context when the information was pushed out?

2) If not, perhaps this situation needs to be solved in other ways? Is there any component or IoT Ge that is placed in addition to probes with probes until the links are restored, and then click on the central context broker with the correct time stamp?

thank

+4
source share
1 answer

I think you can attach metadata to your attribute about the timestamp that the data should have created. This kind of metadata is also stored in Cygnus in HDFS, as shown in this example:

{
    "recvTimeTs":"13453464536",
    "recvTime":"2014-02-27T14:46:21Z",
    "entityId":"Room1",
    "entityType":"Room",
    "attrName":"temperature",
    "attrType":"centigrade",
    "attrValue":"26.5",
    "attrMd":[
        {
            name:CreationTime,
            type:timestamp,
            value:2014-02-26T12:34:09.672Z
        }
    ]
}

In this case, you have receive time (recvTime) and creation time (metadata).

+1
source

All Articles