fiware-orion icon indicating copy to clipboard operation
fiware-orion copied to clipboard

Notifications for attributes from CPr

Open SBlechmann opened this issue 4 years ago • 1 comments

Orion holds an entity that gets some attributes from an external CPr. When I querry the entity I see all the attributes (attributes orion holds and the ones from the CPr).

In the end I would like to have all the attributes' values in my timeseries db routed through QL. But apperently, the orion only raises a notification for attributes orion holds.

Obviously, you can create a workaround script that just taked the value and saves it in a similar named attribute which is hold in Orion. But I'd ask if this option (similar to #3693 ) can be integrated into the subscriptions in order to forward non-hold attributes as well from Orion directly to QL.

Thanks so far and I'm happy for your contributions :)

SBlechmann avatar Oct 12 '20 15:10 SBlechmann

I think we can distinguish between two diferent scenarios:

(triggering attribute = the attribute which change triggers the notification)

  1. The triggering attribute is in the CPr. This scenario is hard to solve, as Orion doesn't know what is happening in CPrs. In other words, if an attribute update takes place in the CPr, Orion doesn't know about that so Orion cannot trigger any notification about that. However, architectural alternatives are possible (i.e. transform CPr in an "active" element so it progress to Orion modifications on its attributes).
  2. The triggering attribute is not in the CPr, but the notification include attributes in the CPr. In that case, Orion could do a query to CPrs to "cover" their attributes. This is pretty similar to a query on the CPr caused by a client request (e.g. GET /v2/entities). This could be an interesteing extension to Orion functionaly. If anybody volunteers to implemented that I can try to guide her/him during the process :)

fgalan avatar Oct 19 '20 09:10 fgalan