skip to content
[readonly]

The generic task publisher: one ticket ring per program slot, and the manifest's policy deciding what meshd publishes

sh
$ sexc add @ajax/mesh-publish
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 05:23v/# 1 version
  • drwxr-xr-x-Oct 27 05:23files/# the files of 0.1.0
latest
0.1.0, published Oct 27 05:23 by ajax
owners
ajax
license
MIT
dependencies
@ajax/mesh-mailbox ^0.1.0, @ajax/mesh-abi ^0.1.0, @ajax/mesh-manifest ^0.1.0, @ajax/mesh-reply ^0.1.0, @ajax/mesh-chan ^0.1.0, @ajax/mesh-buf ^0.1.0, @ajax/mesh-check ^0.1.0
dependents
@ajax/mesh-driver
keywords
mesh alphaos publisher ring tickets policy
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-publish
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-publish
2
3The generic task publisher: one ticket ring per program slot, and the manifest's policy deciding what meshd publishes.
4
5The generic task publisher (publish.rs; contract v2).
6
7One ring per program slot, and the manifest's policy deciding what meshd publishes on its own: continuous (a batch whenever the previous one completed, or topped up to `fanout` in flight with in_flight = "free"), periodic (`fanout` tasks at `hz`), on_demand (nothing; only task/req). The arg is the index 0..fanout or the view's u32 at `arg_off` (+ index). Nothing here knows any program: a new program needs no meshd change.
8
9Ticket rules: ticket t uses ring entry and completion slot t % 64; t may be published only once no outstanding ticket is 64 or more behind.
10
11```c
12#include "mesh/publish.h"
13```
14
15## Ported from
16
17[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/publish.rs: `Kind`, `Out`, `PRing` (every method), `due`, `publish_auto`, `publish_parts`.
18
19## Tests
20
21- `tests/publish.c`: publish.rs's `rings_are_per_slot`, `full_ring_and_rewind` and `policies`, one for one.
22
23## Differences
24
25- `Instant`s are nanoseconds on the monotonic clock.
26
27## Licence
28
29MIT. See the repository's LICENSE.