Device Interaction (through Data Orchestrator)
To interact with the other side of the domain (i.e. devices), Device Manager is built upon Data Orchestrator and it exchanges data with it using two of its mechanisms: its REST API and Data Orchestrator Triggers. Each Device Manager tenant is mapped to a Data Orchestrator Realm, and it owns the credentials to interact with all the Realm APIs for that specific Realm.
Device Manager Data Orchestrator Interfaces
The interaction between Device Manager and Data Orchestrator is defined by a set of interfaces that define which data is sent both from Device Manager to the Devices and from the Devices towards Device Manager. Additionally, connection and disconnection triggers are installed in the Data Orchestrator Realm, and point to the triggers endpoint of the Device Manager tenant.
Data Orchestrator AppEngine API
The REST API is called every time Device Manager needs to retrieve data contained in an Data Orchestrator interface or when it needs to send data to the Devices. In the first case, Device Manager issues a GET HTTP request to retrieve the data from AppEngine API, which reads the data from the Data Orchestrator database. When Device Manager needs to send data towards a Device instead, it sends a POST HTTP to AppEngine API, which takes care of delivering data via MQTT to the device.
Data Orchestrator Triggers
Data Orchestrator Triggers are used to update the online state of the device. Each time a Device connects or disconnects from Data Orchestrator, Data Orchestrator Trigger Engine sends an HTTP POST request to the Device Manager backend, which in turn updates the Device online status in its own database.