skip to content
==> README.md <==
1# @ajax/mesh-jobs-select
2
3Who gets a job's next lease: every member's verdict, best first. A member is rejected if it is down,
4not in the job's members, or doesn't run any of the job's programs. Otherwise the fleet scheduler
5decides: its filter (cordon, backends, arch, memory, avoid), a failure of the program there, then its
6score (measured speed and share, CPU and memory headroom, prefer, the owner penalty). The owner
7policy's backoff applies too (HTCondor's): a member held busy gets no leases while an idle member runs
8the program, and only floor-sized ones when it is the only one. `mj_pick_line` is what `job status`
9prints.
10
11The scheduler is an interface (`mj_sched`). `@ajax/mesh-jobs-sched` implements it over the fleet's
12model (`@ajax/mesh-sched-*`). Without one (a single meshd), a member that is alive and runs the
13program is eligible, unscored.
14
15## Ported from
16
17[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT):
18`crates/mesh-host/src/jobs.rs`: `Pick` (`ok`, `line`), `select`. `SchedCx` became the `mj_sched`
19interface.
20
21## Tests
22
23`tests/select.c`: no fleet (alive and running it; down; not in the job's members; does not run
24there), and a stub scheduler (rejected, backed off when busy, unscored, best-first order, the busy
25member alone with floor-sized leases). With the fleet's own scheduler, the Rust's
26`select_is_the_schedulers_filter_and_score` runs in `@ajax/mesh-jobs-sched`.
27
28## Licence
29
30MIT. See the repository's LICENSE.