Skip to main content

Module pool

Module pool 

Source
Expand description

The pool feature: the app side of remote inference over weirdnet-net.

  • NetDialer: a Dialer that opens agent protocol streams to peers by id.
  • LinkedNodes: a NodeSource of the inference nodes among the user’s linked devices (active certs in the weirdnet-sync roster whose node announces INFERENCE_APP), direct connections before relayed ones.
  • connect: a Pool over both, presenting this device’s certificate.

The pool itself (crate::remote::pool) is transport-neutral.

Re-exports§

pub use crate::remote::pool::Answer;
pub use crate::remote::pool::CatalogWatch;
pub use crate::remote::pool::EventSink;
pub use crate::remote::pool::Interrupted;
pub use crate::remote::pool::Job;
pub use crate::remote::pool::NoEvents;
pub use crate::remote::pool::NodeSource;
pub use crate::remote::pool::Pool;
pub use crate::remote::pool::PoolEvent;
pub use crate::remote::pool::PoolOptions;
pub use crate::remote::pool::Stall;

Structs§

LinkedNodes
The inference nodes among the user’s linked devices.
NetDialer
Opens agent streams over a weirdnet-net node. Node ids are peer ids.

Constants§

INFERENCE_APP
The app name inference nodes announce (Node::serve_app), so the pool can find them among the user’s linked devices. Model nodes do not announce it: apps never call them.

Functions§

channel
A Channel over a stream: length-prefixed messages (crate::remote::codec). A task drives the stream; dropping the channel closes our side, and once both sides are done the stream is dropped. Call from a Tokio runtime.
connect
A Pool over node: inference nodes among the roster’s linked devices, presenting cert (this device’s certificate) with every request.
decode_cert
encode_cert
A certificate as presented with a request (Caller::cert_bytes, PoolOptions::cert).
stream_limits
Stream limits for the agent protocols: weirdnet-net defaults (30 s resume window), no idle reset (a queued request can be quiet for a while; Queued keepalives come every 3 s).

Type Aliases§

RosterView
The roster as it is now (the app keeps it current from weirdnet-sync).