Module edge

Module edge 

Source
Expand description

The three values a host hands a pure program at the edge.

A Beck program never constructs an Envelope, a Session or a Proposal — it receives them. §3.7’s replay rule is the reason: “env.at and env.actor are read as data and never from a clock”, which is only true if something outside the program supplies them.

They are built here rather than in the runtime because a Mode B client builds them too. A browser that applies a command speculatively folds it under an envelope of its own, and an envelope with a differently-spelled field is a fold that fails in the browser and succeeds on the server — the exact class of divergence Mode B has to be free of, since its whole claim is that the client runs the same fold (crate::render).

Constants§

ROOT
The route a connection has not stated: the application’s own root.

Functions§

awareness
An awareness roster: each actor’s contribution, keyed by actor.
awareness_of
The roster of a world with one connection, for presence_of’s reason: a caller with no registry is rendering the page one actor sees while looking at it, and a roster without them in it would describe a page nobody is reading.
confirmed
The freshness of a page nothing is in flight for.
envelope
Envelope[Event] — the record a fold sees.
freshness
Freshness — whether the page about to be rendered is of the confirmed state or of a guess.
no_awareness
No roster at all — what a page that reads none is handed.
presence
The roster presence() produces: actor to how many connections that actor holds.
presence_of
The roster of a world with one connection: the viewer’s own.
proposal
Proposal — a command and who proposed it, which is what validate is given and the only place a Session reaches (§3.5).
session
Session — who is asking, what the identity provider said about them, and where they are.