Open ausshir opened 7 years ago
Kind-of secondary, but here is someone's solution implementing WebRTC on Bottle (which would give us true UDP with Javascript).
https://github.com/xhs/webrtc-experiments
Of course, it's 'not working yet' haha
I have made a proof-of-concept in the rover-webui repo and updated the relevant files of the rover software on the branch websocket-integration.
It is currently using the bottle-websocket plugin, as that appears to have removed the need for a custom thread-safe WSGI server because it is using the gevent server as a starting point.
As a result of the previous testing session in Drumheller, I noticed that the WebServer process is extremely sensitive to routing+DNS because of the HTTP protocol we are using to send data.
The current system requires a new socket to be opened for every message, and the tcp exchange to be successful (meaning it also will retry until getting delivered). If some part of this long process is delayed, the current HTTP protocol will also delay any future messages so they don't arrive out of order.
For something like joysticks, we need a more streamlined data flow. The current websocket protocol looks promising, but it is still TCP (not fixing out delay problem). However, once the connection does establish, it should be a lot more reliable.
https://www.tutorialspoint.com/html5/html5_websocket.htm on the webpage side https://github.com/zeekay/bottle-websocket on the webserver side (maybe?)