Work with reconnects and site updates seamlessly #36
Labels
archived
Not fully finished but won't be worked on unless the situation changes
bug
Something isn't working
enhancement
New feature or request
section: website
Relates to website pages
Whenever the dev site is updated, the data server is restarted through PM2. This means all of the cached data is emptied and all clients must reconnect.
However, whilst clients do automatically reconnect, they don't rejoin the rooms (ie item updates) so the clients are essentially frozen in time until they are force refreshed.
A good fix for these would:
As the server cache will be empty, it's important to check that re-sending the item data doesn't just send empty data, especially during a broadcast, especially since clients will reconnect instantly and the server has just restarted.
Potentially this could be done hand-in-hand with a full site reload when a new commit is pushed.
We can use the commit number on the server and client to check if the version if the same. There is a discussion to be had about refreshing pages during broadcast - is it worth having a manual refresh option? Should it affect both website AND broadcast clients?
I feel that in theory it should be manual only to avoid messy reloads, but in practice it should be fine to have automatic reloads. If the update is pushed away from broadcast, there's no problem and it's wanted to have everything reload to test changes. If the update is close to or during a broadcast, these are usually emergency or late updates and having everything reload at once is desired over having broken or old code running.
The text was updated successfully, but these errors were encountered: