Am i overenginering it with websocket for IOT device Pushing data to endpoint
<p>I have a raspberry pi running unix and it has a gps chip that sends text over its serial com pots.</p>

<p>I want to forward this data without doing any kind of parsing, just forward the data stream directly to a endpoint (running aspnet core, webapi and signalr).</p>

<p>Just like if i was doing <code>sudo cat &lt; /dev/ttyUSB0</code> </p>

<p>To broadcast the data i will do a python script instead of cat in above command to read the data coming from usb0. </p>

<p>Since its text messages coming from the USB at a decent rate, i dont want to do a http request for each message. Instead of want to open a connection to the backend and just push data.</p>

<p>I set up a signalr rawconnection very easily and theres a signalr client for python, so its not a big task to make it all work.</p>

<p>I am conserned about, if there is overhead of using signalr (websockets) for this. is the alternative to just open a http post request and keep it alive?</p>

<p>I am guessing that signalr can provide me with some connection monitoring and help keeping the connection alive incase of failures. But are there any other benefits of using websockets for something like this.</p>

<p>Is the benefits higher than the costs, what are the costs?</p>

<p>as compared to http websocket is always a good choice for such cases.</p>

<p><a href="https://www.engineyard.com/articles/websocket" rel="nofollow">benefits of websockets</a></p>

<p>but for iot related stuff MQTT is preferred.</p>

<p>here it is articulated really well <a href="https://systembash.com/mqtt-vs-websockets-vs-http2-the-best-iot-messaging-protocol/" rel="nofollow">https://systembash.com/mqtt-vs-websockets-vs-http2-the-best-iot-messaging-protocol/</a></p>

python websocket signalr asp.net-web-api2