Expand description
/weirdnet-backends/node/1: how inference nodes drive model nodes over weirdnet-net.
A model node pushes a Capability record to every subscriber: signed by the node’s key,
chained to the user by its NodeCert, with a sequence number and a 90 second expiry,
refreshed every 15 seconds and on every change. It takes Commands: Load, Unload,
Drain, GroupUp/GroupDown and Health. Inference itself is raw
/weirdnet-agent/infer/2 through ModelHost, served next to node/1 by NodeServer.
Each stream carries one ClientMsg (CBOR, with the caller’s certificate) and its answers
(ServerMsg); a Subscribe stream stays open for records until either side closes it or
the node withdraws. Which nodes may drive a model node is the Authorize hook’s decision
(weirdnet_agent::serve::RosterAuth admits the user’s linked devices).
Swap groups that span machines (a Ray worker or an rpc-server bound to a private link)
are started by the application’s GroupWorkers; without one, a node answers GroupUp
with Unsupported and says group_jobs: false in its record.
Structs§
- Capability
- What a model node can do right now.
- Client
Msg - What a client sends: its certificate and one command.
- Group
Plan - A swap group spanning machines, as the coordinator planned it.
- Health
- A health report.
- Load
- The node’s load.
- Model
Entry - One model in a
Capabilityrecord. - Model
Health - Node
Client - An inference node’s side of node/1: drives model nodes over a
Dialer(weirdnet_agent::pool::NetDialeron Weirdnet). - Node
Server - Serves a
NodeServiceon aweirdnet-netnode: node/1, raw infer/2 through the service’sModelHost(no infer/1, no catalog, no inference announcement) and theMODEL_NODE_APPannouncement. Dropping it stops serving. - Node
Service - A model node’s node/1 side: issues records and runs commands against its
ModelHost. Transport-neutral (NodeService::servetakes a channel);NodeServerruns it on aweirdnet-netnode. - Signed
Record - A capability record with its signature and certificate.
- Subscription
- Verified records from one model node.
- Verifier
- Checks records against the user: valid signature, and a valid, unrevoked certificate from the user for the very node that signed.
Enums§
- Command
- A node/1 request.
- Server
Msg - What a model node answers.
- Update
- An update on a
Subscription.
Constants§
- MODEL_
NODE_ APP - The app name model nodes announce (
Node::serve_app), so inference nodes find them among the user’s linked devices. - PROTOCOL
- The protocol id.
- RECORD_
TTL - How long a record is good for.
- REFRESH
- How often a subscriber gets a fresh record when nothing changed.
Traits§
- Group
Workers - Starts and stops the processes of a cross-machine swap group (a Ray worker, an
rpc-server). The application provides it; this crate has no such adapters.