SignalK / signalk-server

An implementation of a Signal K central server for boats.
http://signalk.org
Apache License 2.0
315 stars 154 forks source link

If there is slow tcp consumer connected to SignalK. SignalK just stops processing for all #1542

Closed mgrouch closed 9 months ago

mgrouch commented 1 year ago

If there is slow tcp consumer connected to SignalK. SignalK just stops processing for all

tkurki commented 1 year ago

This is something that we have encountered with ws connections before. Slow draining ws connections are closed by the server when outgoing buffer grows over a threshold.

tkurki commented 1 year ago

Fyi I am not going to spend time on this, as I feel ws is far superior to tcp and imho we should drop sk over tcp support.

mgrouch commented 1 year ago

WS works over TCP. Try using WS on some small microcontroller and you will see that plain tcp is way better for it.

mairas commented 1 year ago

If an MCU is sufficiently capable to to run an IP and TCP stack, it definitely can talk WS. An ESP8266, which nowadays costs less than 1 USD in small quantities, breaks no sweat doing that, and even an 8-bit ATmega328P can do it. Support for WebSocket is nowadays built in even in many manufacturer SDKs, let alone numerous popular 3rd party libraries.

mgrouch commented 1 year ago

Yep. Tried to talk to pypilot via ws on MCU. It uses Socket.IO over it. No. Thanks.

tkurki commented 9 months ago

Duplicate of #1055