I am working on IoT project, and I should keep the embedded device to be connected with a web-service. So, which is better, requesting the webservice every 1 or 2 seconds, or opening a socket with the server to guarantee the real time operations.
Taking into Consideration that working with sockets, may require me to write a lot of bunches of codes, as there's no frameworks for socket over ARM for example.
Thanks
My team and I are currently working on an IOT platform, here are my suggestions:
After all, you need to make your choice on your product's requirements.
You can use MQTT protocol, its library is available for embedded c as well as for arduino. Also you can choose, Rest/Coap with nodejs as the request will be waiting until node will give response In this both scenario, real time communication can be approached without any socket and refreshing time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With