pub enum Op {
}Expand description
What a vertex does. One variant per construct in §3.7’s signal vocabulary.
Variants§
Ingress
merge_clients() — the one place time and nondeterminism enter.
Presence
presence() — who is connected now.
A source like Op::Ingress and a Signal rather than a Stream: connections are a value
defined at all times, not occurrences. It is the only vertex here that is neither the log
nor derived from it, which is the one fact everything else about it follows from — see
crate::split for what that forbids and crate::plan for what it costs.
Awareness
awareness(f) — every subscriber’s f(session), keyed by actor.
A source for Op::Presence’s reason and with its rules: the runtime holds every
connection’s Session, so it computes each contribution itself and this vertex reads what
it publishes. f is carried here rather than being a signal input because there is no
signal to read — the subscribers are the runtime’s fact, not the graph’s.
Freshness
freshness() — whether what is about to be rendered is confirmed or a guess.
A source like Op::Presence, and the other one that is not the log. The difference is
which side holds it: presence is the server’s fact about its sockets, freshness is the
client’s fact about its own unacknowledged commands — so this one is refused to a page
that renders on the server (crate::render) where presence is refused to a page that
renders on the client.
Decide
decide(proposals, state, validate) — §3.5’s authority chokepoint, as a node.
Fold
fold(step, init, stream). The accumulator, and the point at which a cycle bottoms out.
Gestures
gestures(step, init) — D30’s non-durable fold, and a source like Op::Presence.
A source rather than an operator over one, because the stream it folds has no other
consumer it could have: a gesture is this client’s and the graph has nothing else on that
side of the seam. So the step and the initial value are carried here for Op::Awareness’s
reason — there is no signal to read — and the vertex has no inputs, which is what makes the
accumulator unreachable from the log by construction rather than by a rule.
Durable
durable(signal) — the accumulator that survives a restart, and therefore the one the log
is of.
Map
signal_map(s, f).
Map2
map2(f, a, b).
PerSession
per_session(s, f) — §3.8’s fanout point, first-class so that Phase 3 can share the
arrangement above it.
FilterMap
filter_map(s, f) on a stream.
Alias
A signal declared as another signal: mirror: Signal[T] = todos.