Package-level declarations

Types

Link copied to clipboard

An aggregate type's ClickHouse settings: wow.aggregates.[<context>.<aggregate>].clickhouse.*.

Link copied to clipboard

Whether every commit of the type is kept (enabled: auto, the Sink's default, keeps it; true or false decide it), and how long (ttl, forever by default).

Link copied to clipboard

An aggregate type's settings. tenant fixes the tenant of every aggregate of the type: its commands and state reads are in that tenant whoever the caller is (me.ahoo.wow.spi.tenant.TenantPolicy). idGenerator names the me.ahoo.wow.spi.id.AggregateIdGenerator bean that gives the type's new ids, or a generator an me.ahoo.wow.spi.id.AggregateIdGeneratorSource bean finds by that name (CosId's, with wow-cosid); the type's ids come from the wowAggregateIdGenerator bean otherwise. A type the node does not serve, or a name nothing gives a generator of, is refused at startup.

Link copied to clipboard

An aggregate type's events queries: unpinned, whether one that names no aggregate runs, over its events store's and wow.query.events.unpinned; store, the store they read (one of wow.stores), its log store when not set: an Elasticsearch store whose event search Sink writes the type's streams, say.

Link copied to clipboard

An aggregate type's queries (wow.aggregates.[<context>.<aggregate>].query.*).

Link copied to clipboard

An aggregate type's snapshot queries: store, the store they read, its snapshot.store when not set. Another store keeps a copy of the type's snapshots for them, written by that store's subscription (wow.snapshot:<store>): an Elasticsearch store that searches the states, say, while the commands and the state reads stay on the type's store.

Link copied to clipboard

One aggregate type's snapshot store: store, the store of wow.stores its snapshots are kept on, over wow.snapshot.store, which its write side, its state reads and its snapshot queries read, unless its query.snapshot.store names another for the queries.

Link copied to clipboard

One aggregate type's store of its log or of its snapshots: one of wow.stores.

Link copied to clipboard
class BackendsLifecycle(backends: HostBackends) : SmartLifecycle

Creates the schemas of the backends the node opened, where they are missing, before anything uses them.

Link copied to clipboard

How a subscription answers backpressure: a downstream that is up but asks to be called later (wow.command.busy, wow.wait.timeout, wow.query.busy, a 429 with Retry-After). The entry is retried, then its aggregate parks; it never pauses the partition. Meanwhile each backpressure halves the handlings the partition runs at once, and each success raises them again.

Link copied to clipboard

How the nodes of a service share the partitions of each context's log, and forward commands to their owners.

Link copied to clipboard
data class ContextSelection(val include: Set<String> = emptySet(), val exclude: Set<String> = emptySet())

The bounded contexts a node serves: wow.contexts.include and wow.contexts.exclude (ContextsProperties) over the domain modules on the class path, their binding indexes (ModelProvider).

Link copied to clipboard

The bounded contexts the node serves among the domain modules on the class path (ContextSelection), all of them by default. A name that is no context on the class path is refused at startup.

Link copied to clipboard

How the node executes commands.

Link copied to clipboard
class GracefulShutdownBound(val bound: Duration) : BeanPostProcessor

Bounds the public server's graceful shutdown (WowLifecycles.GRACEFUL_SHUTDOWN_PHASE) at bound (#6958). Spring Boot's graceful shutdown waits for every request still open, one whose body stalls or whose reader stops reading included, until its phase's timeout, which the host raises to the node's stop bound for the node's own phase. This phase gets its own: the longest wait a request holds, wow.wait.max-timeout, and MARGIN for its answer to be written, or the phase's timeout when that is shorter (of). Past it, the server's stop cuts what is still open: Spring Boot's NettyWebServer.stop aborts the graceful shutdown and disposes the server, within Reactor Netty's 3 seconds.

Link copied to clipboard
Link copied to clipboard
class InternalServerLifecycle(server: InternalPort, bound: (port: Int) -> Unit = {}) : SmartLifecycle

Serves the internal port from before the node starts until after it stops; once the port is bound, tells bound the port it is bound at, so a node whose port the system chose learns its address (ServiceNode.bind).

Link copied to clipboard
data class NodeIdentity(val service: String, val node: String, val address: String?, val host: String, val bindHost: String, val serviceKey: String = WOW_SERVICE)

Who this node is: the service it belongs to, its node id and the address of its internal port, null while the port is not bound yet when the system chooses it (wow.internal.port=0): the node then learns it as host and the bound port (ServiceNode.bind).

Link copied to clipboard

The options a node is built with, replaced: when a bean of it is present, its result over the options the host built from its properties is what the node runs with; absent, nothing changes. A seam for measurements (the benchmark server sets the append queue's and the snapshot writes' counts through it), not configuration: none of what it can change is bound to a property, and making any of it one is a later decision with its own evidence.

Link copied to clipboard
Link copied to clipboard

The standby of node as the internal port's operator routes see it (wow.node.standby).

Link copied to clipboard

The operator's side of the parked entries: the webhook told when an entry parks, and the failure ledger published to the ops context. Their routes are the edge's, wow.http.ops.enabled.

Link copied to clipboard

The automatic retries of parked entries over minutes and hours; per subscription, wow.subscriptions.[<context>.<name>].parked.* overrides them.

Link copied to clipboard

One subscription's retry spec of its parked entries, each setting not given being wow.subscription.parked's.

Link copied to clipboard

Publishing the failure ledger to the ops context, so one console sees the parked entries of every service: each entry goes to the parked aggregate of the ops context through its command topic, which needs a topic transport.

Link copied to clipboard
class QueryStreamsLifecycle(streams: QueryStreams) : SmartLifecycle

Ends every open query stream of the public port with end {"reason":"node-stopping","resumable":true}, and refuses new ones, as the node starts to stop: its clients resume them on another node.

Link copied to clipboard

How a failing read is retried, never giving up: the wait grows from initial-backoff by multiplier at each failure, up to max-backoff; past error-after-attempts attempts each failure is logged as an error.

Link copied to clipboard

A retry policy: the wait grows from initial-backoff by multiplier at each failure, up to max-backoff.

Link copied to clipboard

One subscription's in-process retry budget: each setting given replaces its handler's @Retry one, each one not given is the handler's, else wow.subscription.retry's. timeout bounds one attempt: one that runs longer is cancelled and counts as failed.

Link copied to clipboard
class RoutesScope : SmartLifecycle

The scope the HTTP routes, public and internal, produce their streamed answers in, apart from the requests: cancelled once the node and the internal port have stopped, so a stream still open then ends instead of outliving the node.

Link copied to clipboard

An @OnSchedule job's settings, the only place it is configured: its rule, the cron, the timeZone and the misfire policy, each unset to keep the annotation's (a tenant's own rule of a TENANT job comes before it); enabled false disables a SYSTEM or a SHARDED job's instances as a node acquires their partitions; and the retry and parked retries of the subscriptions that run it, over its handler's @Retry and wow.subscription.retry, and over wow.subscription.parked.

Link copied to clipboard
class ServiceNodeLifecycle(node: ServiceNode, events: ApplicationEventPublisher, standby: Boolean = false, availability: () -> ApplicationAvailability?) : SmartLifecycle

Starts the node once its backends and internal port are up, and stops it once the public server has stopped: a stop reports the application not ready first, when nothing did (a host without a public server), then runs ServiceNode.stop apart from the thread that closes the context, which waits for it at most the phase's timeout.

Link copied to clipboard
fun interface ServiceNodeListener

Hears each step of ServiceNode.stop once it is done, in order: a bean of the application's.

Link copied to clipboard

The bounds of each context's shared states, the states its consumers share after each commit.

Link copied to clipboard

The cache of aggregate states each context keeps between commands.

Link copied to clipboard

How the node's subscriptions run, retry their failures and park what keeps failing.

Link copied to clipboard

One subscription's settings. start is where it starts in a partition it has no checkpoint in yet: beginning, end, or an ISO-8601 instant (2026-10-01T00:00:00Z), the first entry committed at or after it; unset, its kind's default (a projection from the beginning, a reactor or a saga from the end). A subscription that has a checkpoint goes on from it. parked is how its parked entries are retried, over wow.subscription.parked. retry is its in-process retry budget before it parks, over its handler's @Retry and wow.subscription.retry. A name the node has no subscription of is refused at startup, and so is the subscription of an @OnSchedule job, whose settings are its job's, wow.schedules.<job>.*.

Link copied to clipboard

When a subscription pauses its partition on a systemic failure: at once on a failure classified systemic, or when enough different aggregates failed within a window with no handling succeeding since. While paused, one attempt at a time probes until a handling succeeds. A handler's failures are classified by its @Retry(recoverable, unrecoverable), then the FailureClassifier beans, then the modules' on the classpath, then the runtime's own.

Link copied to clipboard

The tenants of the callers.

Link copied to clipboard

The node's firing loop of the timers, which sends the scheduled commands when they are due.

Link copied to clipboard

How long and how far the commands' waits go.

Link copied to clipboard

The webhook of the parked entries, told when an entry parks or spends its retries.

Link copied to clipboard
class WowModels(val providers: List<ModelProvider>, val models: List<AggregateModel<*>>)

The aggregate models the node serves and the providers they come from (the binding index), with their factories' parameters from the application's beans.