Example Map
This page maps real code in the repository to the guides, reference pages, and scenario cookbooks in this site.
Use it when you want to move from documentation to concrete source files without guessing which example is current.
Reading Path
Runnable Examples In dsm-examples
| Code entry | What it shows | Read with |
|---|---|---|
com.leanowtech.dsm.examples.runtime.RuntimeConsoleApplication | Minimal standalone process that starts a runtime and keeps it alive | Getting Started, Standalone Quickstart |
com.leanowtech.dsm.examples.runtime.RuntimeExampleFactory | One register, one lease, and one CRDT wired into the same runtime | Runtime API, Collection Specs |
com.leanowtech.dsm.examples.springboot.SpringBootDsmApplication | Spring Boot entrypoint for DSM runtime startup | Spring Boot, Spring Properties |
com.leanowtech.dsm.examples.springboot.RuntimeSpringBootConfiguration | Supporting codec, merger, and entity-factory beans for Spring Boot | Spring Boot, Collection Handles |
com.leanowtech.dsm.examples.repl.DsmRepl | Interactive REPL over a shared register collection using multicast discovery | Getting Started, Collection Types |
Scenario Mapping
Service Discovery / Routing
The runtime example wires a route-hints register, the RouteHint entity and codec, and standalone runtime assembly.
Use these sources:
RuntimeExampleFactoryRuntimeConsoleApplication
Read with:
Shard Ownership / Owner Election
The runtime example wires the shard-owner lease collection, a blank entity factory, and lease renewal and transfer semantics.
Use these sources:
RuntimeExampleFactoryRuntimeIntegrationTest
Read with:
Distributed Counters / CRDT
The runtime example wires the request-counter CRDT, PnCounter update codec, state codec, and merger.
Use these sources:
RuntimeExampleFactoryRuntimeSpringBootConfigurationRuntimeIntegrationTest
Read with:
Integration Tests In dsm-integration-test
| Test class | What it proves | Read with |
|---|---|---|
TwoNodeIntegrationTest | Manual two-node register replication with fake membership and explicit sync services | Service Discovery & Routing, Diagnostics |
RuntimeIntegrationTest | Locator isolation, CRDT counter merges, and lease fencing behavior | Collection Types, Shard Owner Election, Distributed Counters |
SecurityIntegrationTest | Signed payload verification and tamper rejection | Observability, Troubleshooting |
FederationIntegrationTest | Bidirectional register convergence across independent runtimes using the in-memory federation relay | Federation, Repair And Anti-Entropy |
ChaosIntegrationTest | Partition healing and anti-entropy catch-up under disruptive conditions | Repair And Anti-Entropy, Production Readiness |
ConsistencyInvariantIntegrationTest | Consistency invariants across randomized operation patterns | Testing Evidence, Error Codes |
Production Evidence
Use Testing Evidence when reviewing whether a feature is only documented, covered by unit tests, covered by integration tests, or still requires service-local validation.
Test Support In dsm-test-support
Use dsm-test-support when you need fake membership or in-memory transport building blocks for your own tests.
Start with:
FakeClusterMembership- test transport helpers used by sync and integration tests
Suggested Workflow
- Read the guide that matches your integration path.
- Open the mapped example entrypoint or test class from this page.
- Keep the matching reference or cookbook page open while copying the pattern.
- Use the troubleshooting pages when the example works but your service does not.