I am working on a python project which involves real time communication between a Raspberry Pi device and Cloud server. After receiving data in the cloud server in real time, I have to display the output in a web application in real time as well. What is the correct way to do this ?
As web applications use socket.io (web sockets) and communication between Raspberry Pi and cloud can be done through a normal socket, I am confused on whether to proceed with normal socket or web socket.
Any feedback will be greatly appreciated.
It all depends on whether you want to work with the TCP stack or the HTTP stack, while TCP sockets have a smaller footprint, HTTP sockets have better support with high level libraries. If you don't need multiple simultaneous connections or high latency requirements, they are both identical, so go with the one that is easier to work with, ie the web socket.
What is the correct method to communicate in real time between Raspberry PI and Cloud Server and then display output in web app?