skip to content
[readonly]

A migration's view arriving in chunks from its source (bounded, sizes checked, duplicates counted once), and a member's smoothed load

sh
$ sexc add @ajax/mesh-peer-view
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 04:09v/# 1 version
  • drwxr-xr-x-Oct 27 04:09files/# the files of 0.1.0
latest
0.1.0, published Oct 27 04:09 by ajax
owners
ajax
license
MIT
dependencies
@ajax/mesh-check ^0.1.0, @ajax/mesh-mt ^0.1.0, @ajax/range-set ^0.1.0, @ajax/mesh-sched-member ^0.1.0
dependents
@ajax/mesh-peer-relay
keywords
mesh alphaos fleet peer migration view load
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-peer-view
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-peer-view
2
3Two pieces of the fleet thread's scheduler glue: a migrated view arriving as F_VIEW chunks from its
4source (`mpv_take`: the total must fit the program's view and stay the same across chunks, no chunk may
5pass it, and a duplicate chunk counts once), and a member's load smoothed over its once-a-second
6samples (`mpv_load_add`, a time constant of about 5 samples) so a tenant's spike does not look busy.
7
8## Ported from
9
10[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) `crates/mesh-host/src/peer_sched.rs`:
11`ViewWait`, `view_take`, `LoadAvg`, `LOAD_ALPHA`.
12
13## Tests
14
15`tests/view.c`: the Rust's `view_chunks_are_bounded_and_counted_once` (review finding 11), and the
16smoothing.
17
18## Licence
19
20MIT. See the repository's LICENSE.