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.
The three roles
Section titled “The three roles”- Entry node — reads one or more named sources from the cache. In Rust it
takes
Option<&T>per source (theOptionisNoneuntil that source is populated); in Python it receives the owned value. - Processing node — takes its upstream node’s output (
&Tin Rust, owned in Python) and returns a new value. - Terminal node — the node with no downstream; its return value is the graph’s result.
Interfaces
Section titled “Interfaces”// entry node: reads the "orderbook" sourcepub async fn ingest(orderbook: Option<&OrderBookSnapshot>) -> SpreadSignal { /* ... */ }
// processing/terminal node: takes its upstream's outputpub async fn format_output(input: &SpreadSignal) -> FormattedOutput { /* ... */ }@cloaca.nodedef ingest(orderbook): # entry: receives the owned source value return spread_signal(orderbook)
@cloaca.nodedef format_output(ingest): # processing: parameter name = upstream node return formatted(ingest)Routing nodes return a (variant_name, value) tuple; the variant selects the
downstream route.
See also
Section titled “See also”- Computation Graph — nodes only exist inside one.
- Boundary event — what populates an entry node’s source.