RTSYork / VLAB

The RTS Virtual Lab
https://wiki.york.ac.uk/display/RTS/The+RTS+Virtual+Lab
GNU General Public License v3.0
9 stars 2 forks source link

Improve handling of board lock expiry #13

Closed RussellJoyce closed 4 years ago

RussellJoyce commented 6 years ago

Currently when a lock expires its associated board is unlocked in the database, but the user can remain connected until that board is randomly reallocated, at which point their connection is suddenly killed.

Two better alternatives would be:

RussellJoyce commented 5 years ago

Second option seems most fair. Having three explicit board states instead of two: locked, in-use and free. In-use state may still need a timeout though, although this could be far longer than a lock. A least-recently used ordering would also make things more fair (and share the board load better).