Open sei-bstein opened 1 year ago
A lot of how we manage the SignalR connection changed substantially with the introduction of synchronized start games, and additional changes will likely come as we go forward with potential new features like the Announcements log and a view that summarizes the user's current registrations / active sessions. My proposal here is to refactor the SignalR implementation such that there is a core service that manages everything about the hub connection, including channel membership. This service would then federate events to appropriate services that are focused on a single channel on the connection (e.g. team-level, game-level, individual-level, support announcements, etc.)
We've merged the branch that has these signalR improvements into gameboard's release line, and we need to prioritize this issue for PC5 to improve stability. The signalR hub is currently making more connections than it needs to, which causes some of the extra chatter and distracting display bugs.
To resolve:
Partially addressed here. Brings GameHub up to the app component level and makes SignalRService a non-singleton, but need to update NotificationService (TeamHub, possibly?) to the new architecture.
I believe this is addressed, but will wait for @sei-bstein to confirm and close.
The current version of Gameboard (and a few versions) prior exhibit some undesirable console chatter from the SignalR web socket due to mismanagement of the connection resulting from expanding its responsibilities for sync start. Issues occur under certain session reset conditions and between some view navigations.
Repro steps for console errors on session reset from a previous browser:
https://github.com/cmu-sei/Gameboard/assets/115497763/0a1c4c6b-108b-4a74-9ed3-cea406f40dcb https://github.com/cmu-sei/Gameboard/assets/115497763/b9969d00-bde5-46bb-b49e-d9c4c325fc58