Realtime Bi-direction Socket

时间:2015-07-28 22:25:39

标签: node.js sockets websocket real-time

I have an Arduino loaded with sensors connected to a Raspberry Pi. The Arduino passes all the data from the sensors to Raspberry.

Now I want to push all of these data in real-time over a socket to a server in the backend, and upload the data into a database.

I'm looking for the most optimal solution for this. Socket.io seems like a popular solution and relies on WebSockets and NodeJS.

Pusher seems like a decent API service that can easily integrate into iOS and Android devices.

What is the best solution out here? It seems like WebSocket is the way to go, but is there a better protocol to use for this purpose?

1 个答案:

答案 0 :(得分:0)

也查看MQTT协议。它正在被广泛用于这种目的。您可以找到开源和商业,以及基于云和自托管的MQTT经纪人。