My team and I are currently working on the IOT platform, here are my suggestions:
- If your product only periodically reports data or status, using a web service to retrieve data will work fine, and it is very easy to implement.
- If you need to send real-time operations from the server to your device, using a long tcp connection is the best choice. There is a good protocol that will help you implement this, for example, MQTT.
- In the second case above, a web service request for real-time operations will work, but it is definitely not a good idea. This will increase the server load and energy consumption of your device.
In the end, you need to make your choice according to your product requirements.
source share