SlideRuleEarth / sliderule

Server and client framework for on-demand science data processing in the cloud
https://slideruleearth.io
Other
25 stars 11 forks source link

Optimize sorting service registry in orchestrator #417

Open jpswinski opened 3 weeks ago

jpswinski commented 3 weeks ago

Many operations in the orchestrator need the members in the service registry to be sorted based on the number of locks they have available. One very optimal way to do this would be to keep track of a list of members for each number of locks up to the max (e.g. if max locks is 3, then there would be four lists: 0, 1, 2, 3). Then when a lock is acquired or given back the member is just moved from one list to the other.