Orbiit / elimination

Aka assassination
https://orbiit.github.io/elimination/
MIT License
2 stars 0 forks source link

Efficientify shuffle notifications #28

Closed SheepTester closed 4 years ago

SheepTester commented 4 years ago

Currently, the notifications database is about 20 thousand kilobytes which are mostly shuffle notifications.

A game admin could spam its users by spamming the shuffle button. Thus, I believe this requires a three-part plan:

  1. When initializing the server, it should go through all the notifications and delete shuffle messages that are less than, say, half an hour before another shuffle message. This should be removed after restarting the server.

  2. When creating shuffle messages, it should check for a previous shuffle notification from the same game within half an hour ago, and if so, it'll delete it.

  3. Game-wide notifications like start, shuffle, and soon announcement notifications should refer to an ID instead that references an object/array in the game object

I think the number of properties for a notification should be limited and instead generated when calling /notifications

This should not require touching the front end

SheepTester commented 4 years ago

Regarding number 3, this is not possible for start and shuffle since targets are personalized, unless it gets the targets on demand, but whatever

SheepTester commented 4 years ago

Implemented in: