Not sure either about that reconnecting-websocket.
Thanks for weighing in @jonespm! I think dealing with this is somewhat important, since WebSocket connections seem to be one of the areas where things can go wrong with this application.
The libraries you mentioned are actually server WebSocket tools; socket.io comes with a client, but I don't think it's compatible with Channels websockets. This is relevant: https://socket.io/docs/v4/#what-socketio-is-not They do mention an alternative to reconnecting-websocket called robust-websocket, but it looks to be even more out of date. I'll have to look and see if Django Channels recommends any particular JavaScript client.
Good discussion about this on #405. reconnecting-websocket was a reasonable choice, but it is getting a bit old, is not being updated. @jonespm highlighted react-use-websocket as an option and sockjs-client may be another. Essentially we are looking for an extension of native WebSocket behavior that also handles reconnecting and some other browsing irregularities.
I noticed today that https://www.npmjs.com/package/partysocket is a fixed replacement for reconnecting-websocket, so might be the easiest thing to use. With this, the effort should be lower to make this change.
Thanks for weighing in @jonespm! I think dealing with this is somewhat important, since WebSocket connections seem to be one of the areas where things can go wrong with this application.
The libraries you mentioned are actually server WebSocket tools;
socket.io
comes with a client, but I don't think it's compatible with Channels websockets. This is relevant: https://socket.io/docs/v4/#what-socketio-is-not They do mention an alternative toreconnecting-websocket
calledrobust-websocket
, but it looks to be even more out of date. I'll have to look and see if Django Channels recommends any particular JavaScript client.Originally posted by @ssciolla in https://github.com/tl-its-umich-edu/remote-office-hours-queue/issues/405#issuecomment-1536521848
Good discussion about this on #405.
reconnecting-websocket
was a reasonable choice, but it is getting a bit old, is not being updated. @jonespm highlightedreact-use-websocket
as an option andsockjs-client
may be another. Essentially we are looking for an extension of native WebSocket behavior that also handles reconnecting and some other browsing irregularities.