We use proprietary and third party´s cookies to improve your experience and our services, identifying your Internet Browsing preferences on our website; develop analytic activities and display advertising based on your preferences. If you keep browsing, you accept its use. You can get more information on our Cookie Policy
Cookies Policy
Ask Your Question
0

REST API - Past values of an entity

asked 2018-04-24 18:50:42 +0200

Btc Sources gravatar image

updated 2018-04-24 18:51:24 +0200

What I have

Docker Containers:

Orion CB
MongoDB

What I do

I use the REST API (NGSIv2) so I:

  1. Create an entity (using POST)
  2. Update the values from this entity (using PUT)
  3. Get the value from the entity (using other app: GET)

My question

Is there any way (inherent to ORION) to have the full history of values of this entity? Something like a queue of messages, or so, being them the values of this entity.

If not, which mechanism should I use (inherent to ORION again) to be able to build it in my second app?

I guess I expect to have a subscription mode or whatever so I get a notification of a new value (public/subs model?) still using the REST API in my second app, not needing it to have hard-coded when a new value of the entity will be available at ORION, since this may be unknown even for me.

edit retag flag offensive close merge delete

3 answers

Sort by » oldest newest most voted
0

answered 2018-05-01 08:08:02 +0200

flegall gravatar image

Hi

As far as I know, there is not such queuing capabilities in Orion. At least you vacan add persistence to Orion with Cygnus + a dB like MongoDB. See: http://fiware-cygnus.readthedocs.io/e...startguide/

Then, if you want to go further, you can look at 2 side components:

STH (Short Term History) comet: https://fiware-sth-comet.readthedocs....

Or alternatively, if the 'fire and forget' approach of Orion is the one bothering you, you may investigate rush : https://github.com/telefonicaid/fiwar... (never tried it)

Franck

edit flag offensive delete link more
0

answered 2018-05-02 09:27:05 +0200

pasquy73 gravatar image

Hi, Orion doesn't store own context. This policy is right, because if your context is composed by many attributes, and you update it, any second ... after few days (for example) the internal database (mongo) of Orion will became full and your service will fault.

To store the context you can use the Cygnus adapter and you can chose, for your app, the right storage system (ex. mongo, mysql, ckan, cosmos big data, etc...) that it depends how much data you want to manage.

pasquy

edit flag offensive delete link more
0

answered 2018-05-15 15:04:40 +0200

jmcantera gravatar image

other options are STH Comet (unfortunately it only supports a flavour of NGSIv1 ... ). See http://fiwaretourguide.readthedocs.io...

here a tutorial for Cygnus and MySQL

http://fiwaretourguide.readthedocs.io...

and another component Quantum Leap (more aligned with NGSIv2, using Crate as DB) is an alternative

https://github.com/smartsdk/ngsi-time...

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-04-24 18:50:42 +0200

Seen: 2,725 times

Last updated: May 15