Package-level declarations
Types
Who sent a command, in its wire form (CommandWire.caller): the fields of a Caller, {tenantId, scope, subject, crossScope, attributes, service}, and nothing else: no credential, token or request header. Its toString leaves the attributes out, the caller's claims.
The cluster channel: the one internal channel between the nodes of a service, listening on their internal port only and trusted without authentication. This port is what the runtime needs of it; a transport (HTTP/2 with JSON, in the host) implements it, reaching a node by its internal address.
A peer could not be reached over the cluster channel. unsent says the request surely did not reach the peer (no connection to it, refused or not opened in time, or not sent by its deadline), so the sender may run the command itself while its deadline is ahead; any other failure of a forward may have come after the peer received it.
What a node serves on the cluster channel: the forwarded commands it executes.
Reads and writes the messages between the nodes of a service as JSON: the cluster channel's ForwardCommand and ForwardReply, and the WaitSignal a node sends to the origin of a wait, reading leniently: unknown fields are ignored at every level, and an unknown status, stage or function kind of a result is read as UNKNOWN (WowJson.readerBuilder), so a node of the minor version before reads a newer one's.
The tuning of partition ownership and the cluster channel on one node (–).
One stream to a peer, taken by ClusterChannel.reserve for one forward: forward sends it, after which the channel frees the stream once the reply ended it; release frees a stream no forward was sent on.
Decides where a command runs: here, through local, or on another node. Whatever runs it, the answer is the Settlement of its execution.
The cluster channel's one message kind for now: a node forwards command to the owner of its partition and waits for the reply until deadline (epoch milliseconds). transport carries the command's wait context and the trace context it executes in, in the one form of a transport (TransportCodec); null when it has neither. The wait's origin stays the node the command arrived at, so later hops signal that node directly, never through the channel.
What a node serves on the cluster channel: it executes the commands other nodes forward to it through coordinator (so its own wait context goes on with the command and later hops signal the origin), for the aggregates of models.
The owner's reply to a ForwardCommand: the result its execution reached at COMMITTED (a commit, a duplicate, no change, a rejection or a failure), followed by the later hops it reached at once (the next HANDLED hop of a command that changed nothing, or of a duplicate whose subscription is past it). Hops reached later are signalled to the wait's origin.
Highest random weight (rendezvous) assignment of partitions to nodes: owner(p) = argmax weight(node, p). Every node computes the same assignment from the same member list without a leader, and a change of members moves only the partitions the joining node wins or the leaving node held, about P/N of them.
A node's internal address as its members read it (me.ahoo.wow.spi.subscription.Member.address) and the internal port's clients join it into a URI: host:port, an IPv6 literal in brackets (RFC 3986), [::1]:9090, so that a colon of the host is never read as the port's. The one place an address is built from a host and a port, or its host read back; everywhere else an address is compared as it is.
The Partitioned router: a command runs on the owner of its log partition, whose state cache is warm and who appends without contention.
This node's share of the partitions of one lease group (–), without a leader: a context's log, or another context's published topic that the service's subscriptions read, whose subscriptions runtime then reads the topic instead of the log:
Why a node refused a forwarded command.
Where the receipt of a cross-context command goes when the target rejects it: the receipts topic of context, the sender's, and the saga handler subscription (processor.function) whose execution of the commit ref@version derived it, the executionId the saga's @OnRejected handler gets. The design's {context, subscription} carries the commit too, so the receipt names the execution exactly.
One node's membership in its service on one lease store: a single record, heartbeated every ClusterOptions.heartbeatInterval, listing the lease groups the node takes part in, and a single read of the service's live members every ClusterOptions.reconcileInterval (or ClusterOptions.routeRefreshInterval, the shorter), which every PartitionOwnership of the node reuses for its reconcile and its routes instead of reading its own. The store operations of membership so stay constant in the number of lease groups: a heartbeat and a read per node and interval, where each group used to heartbeat, and read its members twice, on its own.
The topic router of one context: the commands of its types are admitted by writing them to the context's command topic, whose partitions are the context's log partitions (partitions), each in the one the log's Partitioner gives its aggregate, so the owner of the aggregate's log partition reads and executes it (me.ahoo.wow.runtime.command.CommandIntake) with no forwarding, and one aggregate's commands keep their order.