Arc 4 Recap — From Collection APIs to Application Engineering (Chapters 15–18)
The application layer now depends on a fulfillment coordination port. DSM locators, typed handles, Spring assembly, and test evidence each have a clear owner.
Engineering boundary
FulfillmentService
→ FulfillmentCoordination (business port)
→ DSM adapter (failure translation)
→ composition root / Spring auto-configuration
→ Runtime + named typed handles
A fake supports fast business-decision tests while the adapter still runs against a real Runtime. Spring Boot is another composition root and does not alter Register, Lease, or CRDT semantics.
Four distinctions
| Distinction | Left responsibility | Right responsibility |
|---|---|---|
| domain port / DSM handle | business action and result | collection operation and technical failure |
| bean name / locator | select a bean in one container | distributed collection identity |
| clusterId/serviceId / locator | communication and sync domain | collection and state domain |
| test pass / production readiness | evidence inside a fixed surface | deployment, capacity, security, and operations acceptance |
How this arc realizes DSM's value
The domain port contains collection APIs, the composition root centralizes locator/codec/lifecycle, Spring Boot provides testable assembly, and the evidence ladder limits every conclusion. This structure reduces integration and evolution cost while keeping DSM types, identity, and failure semantics out of business services.
Transfer checklist
- Does a business service import
com.leanowtech.dsm.*outside a composition root or adapter? - Does every locator have one source of truth and a schema ID?
- Does a Lease result retain uncertain, reason, and fencing token?
- Does Spring fail fast on duplicate locator, missing codec/merger, and invalid Lease settings?
- Is a cluster/service identity change handled as protocol migration?
- Does each test layer record
provesanddoesNotProve?
Evidence in this arc
- The book example provides an E1 domain-port test and E2 real-Runtime test.
- Spring auto-configuration fixes Runtime, three collection beans, configuration failures, and lifecycle behavior.
- Runtime integration fixes locator isolation, CRDT behavior, and Lease fencing.
- TwoNode/Chaos fixes E3 replication, repair, and partition behavior.
Next
Arc 5 completes the production operating contract: observability, security, lifecycle, and capacity measurement.