wip: migrate to mono-repo. SPN has already been moved to spn/

This commit is contained in:
Patrick Pacher
2024-03-15 11:55:13 +01:00
parent b30fd00ccf
commit 8579430db9
577 changed files with 35981 additions and 818 deletions

13
spn/unit/doc.go Normal file
View File

@@ -0,0 +1,13 @@
// Package unit provides a "work unit" scheduling system for handling data sets that traverse multiple workers / goroutines.
// The aim is to bind priority to a data set instead of a goroutine and split resources fairly among requests.
//
// Every "work" Unit is assigned an ever increasing ID and can be marked as "paused" or "high priority".
// The Scheduler always gives a clearance up to a certain ID. All units below this ID may be processed.
// High priority Units may always be processed.
//
// The Scheduler works with short slots and measures how many Units were finished in a slot.
// The "slot pace" holds an indication of the current Unit finishing speed per slot. It is only changed slowly (but boosts if too far away) in order to keep stabilize the system.
// The Scheduler then calculates the next unit ID limit to give clearance to for the next slot:
//
// "finished units" + "slot pace" + "paused units" - "fraction of high priority units"
package unit