Search code examples
fiwarefiware-orion

Orion Context Broker - references to data models


I'm preparing laboratory script for presenting features of of OCB, however there is a misconception on how OCB references to Data Models defined by FIWARE. I'm aware of parameter 'type', which is supplied along with new entity. The problem is connected to OCB. How does it difference between data models?

I can add variables from different data model which don't match. I can't find the controller for it and if there is no any that's really shame. The problem I got is connected with situation:

  1. Creating entity with declared type for instance: Device
  2. Adding some parameter, which is not specified in Device schema. It could be dateLastWatering from Garden data model.

It doesn't make any sense, how the OCB reacts to that?

From my experience it just "swallows" the updated content as long as semantic of command is correct.

I received information that a restriction can be implemented in application layer, however in my opinion it should be supplied along with OCB already.

That way model can be mistaken and the example is not really educational. It could be useful if after defining a model for entity, OCB could interact somehow with user and check, or debug what it receives. That way it would be more professional I guess and fore sure more safe to use. If OCB doesn't have that feature is there a possibility for further development?


Solution

  • Orion Broker is totally agnostic with regards to Data Models. Orion is not intended to check schemas or perform data validation. In fact, it is a nice feature that the schema of the Data is free and up to applications.

    However, FIWARE defines Data Models to promote harmonization in certain domains, for instance smart cities. So it is nice to reuse or extend existing data models for the sake of data portability.