There is no logic in the backend to handle closing empty rooms and removing them from the database, which will cause memory issues in the long run.
Rooms should:
expire after a certain amount of time after it is created
Pro: ensures room instances in the database will always be cleaned up
Con: rooms could close in the middle of a session if existing for too long
Possible solution: prompt users to extend their expiration time, but could still be a vulnerability to malicious users
contain a user count that triggers a room deletion event when it reaches 0
Pro: will prevent rooms from ending mid-session
Con: could potentially stay open forever if a user maintains a connection to the server
Possible solution: an absolute deletion time is specified to prevent any malicious attempts that try to cause database overload by preventing room deletion
Both options have downsides that need to be further identified and addressed, but should be implemented before a better solution is found.
There is no logic in the backend to handle closing empty rooms and removing them from the database, which will cause memory issues in the long run.
Rooms should:
Both options have downsides that need to be further identified and addressed, but should be implemented before a better solution is found.