IoT Platforms
IoT platforms serve multiple functions, the primary one being to receive the data from microcontrollers over the MQTT protocol. In addition, they may validate the data to ensure it is being published by authorized microcontrollers and in the right format, before sending them on for further processing.
The microcontroller boards will receive the data from the sensors attached to it and publish the raw data (without any pre-processing) to an MQTT Broker. The data from the MQTT Broker will be read by a subscribing microservice and written to a NoSQL DB and the Smart Contract as required.
Every microcontroller and sensor used in the solution will have an id programmed into it. The mapping of microcontrollers and sensors will be stored in the NoSQL DB. The microcontrollers used for an order will also be mapped in the NoSQL DB. This mapping will be used to validate the data received and to filter out invalid data before it is sent to the Smart Contract.
Microcontrollers will send data to the MQTT Broker at a predefined frequency.