tl-its-umich-edu / remote-office-hours-queue

Virtual queuing tool supporting Zoom video conferencing and/or in person meetings.
https://officehours.it.umich.edu/
Apache License 2.0
12 stars 28 forks source link

Replace WebSocket client library #410

Open ssciolla opened 1 year ago

ssciolla commented 1 year ago

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.

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 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.

jonespm commented 1 month ago

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.