ARC 6Prove Boundaries and DeliverChapters 23โ€“26

Chapter 24 โ€” Collection Semantics across Clusters

Chapter objective: After this chapter, a developer can describe federation propagation, recovery, and ownership boundaries separately for Register, Lease, and CRDT, and reject claims of automatic global strong consistency.

Learning objectives

  1. Identify remote cluster, service, and locator with FederationTarget.
  2. Distinguish federation semantics for the three collection types.
  3. Interpret relay health and binding status.
  4. Identify the gap between an in-process baseline and production cross-region transport.

Prerequisites

Case progress

The fulfillment team runs independent clusters in two regions. Route hints need cross-region visibility, shard owners are observed remotely, and request counters can merge. One vague "synchronization policy" cannot cover all three invariants.

Three collections cross one boundary with different semantics

Federation semantics for Register, Lease, and CRDT

Type Initial state Live changes Catch-up path Cross-region boundary
Register bootstrap current visible snapshot forward put/remove periodic digest repair; rebootstrap if needed eventual convergence, no cross-region transaction
Lease no bootstrap forward LeaseSnapshot no anti-entropy sweep remote read-only observation; no acquire/renew
CRDT no bootstrap forward committed delta no federation sweep depends on mergeable/idempotent delta and eventual delivery

A remote Lease snapshot does not create cross-region ownership. Owner and fencing authority remain in the source cluster; the snapshot can support routing or operations observation, not permission for an external effect.

Target is complete identity, not a URL

FederationTarget contains remoteClusterId, remoteServiceId, and remoteLocator. The relay finds Runtime by cluster/service and collection by locator. A mismatch at any layer fails explicitly; equal collection names do not imply equal state.

Health qualifies confidence in propagation

A binding is SYNCING, HEALTHY, DEGRADED, or DISCONNECTED. Forwarding stops after relay failure; Register performs catch-up bootstrap after recovery. Binding health says nothing about global confirmation of business facts.

The current implementation boundary

InMemoryFederationRelay connects independent Runtimes in one process. It executes real bridge semantics for three collections but has no gRPC/HTTP, cross-host link, authentication, retry budget, or production latency. A production relay implements bootstrap, put/remove, repair, Lease snapshot, and CRDT delta, then separately satisfies the security/capacity contracts from Chapters 20โ€“22.

Counterexample and fault injection

Experiment

cd submodule/dsm
mvn -q -pl dsm-federation,dsm-integration-test -am \
  -Dtest=InMemoryFederationBridgeTest,FederationIntegrationTest \
  -Dsurefire.failIfNoSpecifiedTests=false test

Use federation-contract.json to check bootstrap, live delivery, repair, and ownership for each collection.

Experiment acceptance card

Field Content
Command Federation unit/integration tests plus book assets
Input or fault bootstrap, live mutation, relay failure/recovery, Lease snapshot, CRDT delta
Observable result Register catches up; Lease remains observational; CRDT merges; status follows relay health
Evidence level E2/E3: two independent Runtimes plus in-process relay
This experiment does not prove Real cross-region transport, security, latency, bandwidth, complete history, or global transaction

Review

Next

Chapter 25 asks which state should stay outside DSM and when a database, cache, event log, or consensus service fits better.