Skip to content

Node

A Node is a vertex in a Computation Graph. It is coupled to its graph — a node has no meaning outside one; the graph’s topology defines what each node receives and where its output goes.

  • Entry node — reads one or more named sources from the cache. In Rust it takes Option<&T> per source (the Option is None until that source is populated); in Python it receives the owned value.
  • Processing node — takes its upstream node’s output (&T in Rust, owned in Python) and returns a new value.
  • Terminal node — the node with no downstream; its return value is the graph’s result.
// entry node: reads the "orderbook" source
pub async fn ingest(orderbook: Option<&OrderBookSnapshot>) -> SpreadSignal { /* ... */ }
// processing/terminal node: takes its upstream's output
pub async fn format_output(input: &SpreadSignal) -> FormattedOutput { /* ... */ }