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

Allocate boards based on least-recently used #23

Closed RussellJoyce closed 4 years ago

RussellJoyce commented 4 years ago

Currently a board is picked at random when allocated to a user. It would be better if the relay allocated the least recently used board of that type instead, to allow for better load balancing and to reduce the likelihood of users accidentally fighting over specific boards.

RussellJoyce commented 4 years ago

Keeping track of a "last unlocked" time and picking the oldest will achieve this. Boards will get a time of 0 when added, so they will be top of the list to be used first.