telefonicaid / fiware-orion

Context Broker and CEF building block for context data management, providing NGSI interfaces.
https://fiware-orion.rtfd.io/
GNU Affero General Public License v3.0
212 stars 265 forks source link

Remove: registration API #4402

Open mapedraza opened 1 year ago

mapedraza commented 1 year ago

As a continuation of issue #4397, this issue is about the definitive removal of the registration API and associated query/update forwarding to CPrs.

fgalan commented 7 months ago

Some notes taken in today's meeting with NEC team about the removal of this functionality:

tstorek commented 6 months ago

@mapedraza @fgalan I can totally understand and appreciate the refactoring of commands in #4397 as it is really fragile. Once someone did something woring the complete commucation chain breaks. However, using Orion as Aggregator is quite useful in many sceanarios because in micro-service structures it is often a hassle to request data from the individual components and requires additional effort when implementing additional services.

Here a an additioanl use case from a smart building control:

Let's say we have a heater in a room and a temperatur sensor (IoT-devices) Instead of the an actual weather station we use open weather map for forecasts. The latter is accessed via a leigtweight state-less NGSI-Proxy that holds is complete information in Orion. With the current implementation our temperature controller can be easily connected to the context broker using MQTT-Subscription for receiving data and HTTP-Commands for control actions. If the controller requires weather information it asks the Orion for the weather-station, which fowards to the request to the provider, which in turn, requests the data from open-weather-map using.

This scenario allows for total event-based communication with the OpenWeatherMap. Here we even control the allowed access rate to the OpenWeatherMap. Hence, we have total control of costs and reduction of management cost using the NGSI-Proxy.

The NGSI-Proxy, can also be used for any other additonal external service. Especially, in smart building where often a heteregenous IT-infrastructure is installed this is quite valuable and allows to integrate many different stakeholder-APIs

Issue without registations The scenario above would not be possible taht easy and requires additonal services the, e.g. implement virtual devices. However, these would require to regularly request and forward data even if not needed. This would also duplicate existing data.

In a nutshell, as @fgalan proposed at least something like a getData function should be available. However, maybe keeping query forwarding is even easier. As the enduser does not need to know where the actual data comes from. Nevertheless, probably there should be a mechanism to check for conflicting registration and harden attributes for that orion has a registration to prevent them from getting overwritten. As from my experience the latter often leads to trouble because developers forget to first delete old registrations before adding a new one. However, same applies to subscriptions.

PS: I hope I could make a point and also git the right issue :)