I have some sensor nodes (Bosch XDKs) that send information to an MQTT broker and an application reads the information and stores it into InfluxDB. Simultaneously, I have RFID readers that scan some tags and send the information to a MongoDB. Based on some logic I wish to merge the data from InfluxDB and MongoDB together and would like to send to a custom platform which would have its own Database where the clubbed information will be stored to be visualized.
The information flow is from sources of data is uni-directional (i.e. from sensors and RFID is only to Databases)
The Combine service can query the databases and combine the information and send it to the platform
Requirement
- I wish to push real-time information to the platform. That is, whenever the MongoDB instance is updated, use some parameters to query the information from InfluxDB, Combine and send push it to the platform.
What I a unable to grasp is whether to use webhooks
or websockets
for the Combine App and also how is it possible to know if MongoDB was updated with some new information?
I read a good SE Query for Webhooks v/s Websockets and found that the scenario is more in the direction for server-to-server
(webhooks) where the client interaces only to the platform via its internal services and not direclty via the two DBs but I am not sure if this is the case.
I see this as a very relevant usage of IoT Real-Time data application and am looking for some clear architecture and implementation answers for the mentioned case above.
Are there repositories that somehow provide help as to how to create webhooks/websockets that fulfill my requirements?