Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Technology to minimize latency in real-time connection

I want to transmit some telemetry data from a car to a web-app. The hardware is taken care of already. It will send data every 100ms through an android device.

I was wondering what has lower latency, websockets (socket.io) or webrtc (Datachannel) ?

Thank you

like image 927
Cornwell Avatar asked Nov 01 '22 01:11

Cornwell


1 Answers

WebSockets works over TCP. Oriented to client and server communication.

WebRTC DataChannel works over UDP. It seems safe to use. It is more oriented to peer2peer communication.

I don't think there is a massive difference in latency. It is up to you if you need reliable delivery (TCP) or not (UDP).

like image 135
vtortola Avatar answered Nov 15 '22 04:11

vtortola