pub struct AppConfig {Show 13 fields
pub snapshot_every: u64,
pub max_batch: usize,
pub dedup_capacity: usize,
pub maintain_views: bool,
pub styles: bool,
pub share_arrangements: bool,
pub columns: bool,
pub retention: Retention,
pub clock: Arc<dyn Clock>,
pub identity: Arc<dyn Identity>,
pub quota: Quota,
pub presence: Config,
pub awareness: Config,
}Fields§
§snapshot_every: u64Snapshot the fold every N events. “durable is the entire database administration story”.
max_batch: usizeUpper bound on group commit: the ingress task drains everything queued up to this many commands and appends their events in one statement. Phase 0 measured 11× for this.
dedup_capacity: usizeHow many recent command ids to remember for idempotency (§4.3).
maintain_views: boolWhether a subscription maintains its view by delta rather than recomputing it (§5.3).
On by default, because it is what §3.8 asks for and it is ~5× faster per event. It is a
switch rather than a fact because it is also a memory-for-time trade — about 4× the bytes
a subscription already held for its page
(docs/23-incremental-views-report.md
§23.8) — and an operator running a fanout of a hundred thousand idle sessions over a large
accumulator should be able to decide that differently without recompiling.
styles: boolWhether /beck.css carries the stylesheet the compiler derived from the program’s own
classes, or nothing at all
(docs/104 §104.4’s
styles = none).
On by default, because a page whose classes have no rules behind them is not styled. It is
a switch rather than a fact because the sheet is an opinion — a preflight and Tailwind’s
design system — and a deployment that ships its own stylesheet should be able to say so
without the compiler arguing. Off, beck_core::style still runs and beck explain style
still answers; what changes is that nothing is served.
Whether the operators that do not read the session are held once for every subscriber rather than once per subscriber (§5.3).
On by default. It costs one lock acquisition per render — a read lock, so subscribers do not
block each other — and saves every subscriber the arrangements below the accumulator that
are the same computation for all of them. How much that is depends entirely on the program:
a view that filters by the session immediately below the fold shares almost nothing, and one
that sorts a public feed and personalises only the greeting shares almost everything
(docs/23-incremental-views-report.md).
Ignored when maintain_views is off: there are no arrangements to share.
columns: boolWhether a list of numbers is held as a column rather than as boxed values
([beck_core::seq], docs/105 §105.10).
On by default, because it halves what a list of numbers occupies and is the only thing in this language a kernel or an Arrow reader can be handed a pointer to. It is a switch rather than a fact for the reason every switch here is one: nothing observable changes — the order, the equality, the digest and the wire bytes are the same either way — so the only thing it can be wrong about is a trade, and a deployment that has measured its own trade should be able to say so without recompiling.
Process-wide, unlike every other field here: a list is built in a hundred places that
have no configuration in scope, so App::start applies this to
[beck_core::seq::set_columns] rather than carrying it. Two applications in one process
therefore share one setting, and the last one started wins — which is stated because it is
the one way this field differs from its neighbours.
retention: RetentionHow long the shared dataflow keeps what a subscriber might still ask for.
The default releases the arrangements when the last subscription ends and keeps at most 64
versions of change history while one is open — but what is actually kept is the oldest
connected subscriber’s lag, so both numbers are ceilings rather than costs. A deployment
whose clients reconnect constantly wants release_when_idle off, and one with slow clients
and fast events wants a deeper history; neither should have to recompile for it
(docs/23-incremental-views-report.md
§23.19 asked for exactly this).
Ignored when share_arrangements is off: there is no shared dataflow to retain anything.
clock: Arc<dyn Clock>Where an envelope’s at comes from.
A dependency rather than a tunable, and here because the merge point is “the one place time
enters” (§3.7) and this is the configuration the merge point is built from. F11’s constraint
is that a clock is supplied and never ambient; beck_core::clock says why, and says what is
deliberately not on the seam yet.
identity: Arc<dyn Identity>How a claimed identity becomes a verified one.
A dependency rather than a tunable, for the same reason the clock is one, and here because
the merge point is where a proposal acquires its actor. DevIdentity by default: beck run
on a laptop must not need a secret, and crate::identity is where the consequences of that
default are written down.
quota: QuotaHow much one actor may turn into permanent storage — F3’s channel (b).
A tunable rather than a dependency, and on by default, which is what
docs/14 F3 decided: a quota a program has to
ask for is a quota most programs do not have. crate::quota is the mechanism, the numbers
and what the bound is actually worth.
presence: ConfigHow large a connection roster this process will hold — D6’s presence signal.
A tunable rather than a dependency, and bounded rather than optional, for the reason
crate::presence gives: the roster is keyed by a name the client may choose.
awareness: ConfigHow large an awareness roster this process will hold, and how large one contribution may
be — the two bounds crate::awareness explains.