OxL Reference

kw shards

Contextual keyword — cluster declaration (§12.1)

The list of words: §1.4

Syntax

ebnf
RoleClause  = "serves" IdentList | "hosts" IdentList | "runs" ( "sagas" | "leader" "(" StrLit ")" )
            | "journal" | "shards" IntLit | "replication" IntLit | "replicas" Expr
            | "needs" Expr | "expose" IntLit { Expr } ;

Grammar: App. A

Defined in

Examples

oxl
let byRegion = cluster.shards(db.Order)
  .map(o => (o.region, o.total))          // executed on the shard owners
  .reduceBy(.0, (a, b) => a + b)          // partial aggregation, then merge
  within REPORT_DEADLINE

cluster.leader("nightly-report") { every(REPORT_PERIOD) { buildReport() } }
cluster.lock("user:{uid}", ttl: LOCK_TTL) { migrateUser(uid) }

— 12.6 Distributed computation

Related diagnostics

actor-not-hosted, cluster-auth, cluster-decl, cluster-needs, cluster-seeds, placement-conflict, saga-without-role, service-not-served, topic-without-journal, unknown-role, fail-type, question-context, unhandled-error, query-not-sql

See also