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
text
need a minimal integration?
-> runtime example or Spring Boot example
need interactive exploration?
-> REPL example
need replication behavior across nodes?
-> integration tests
need reusable fake infrastructure?
-> dsm-test-supportRunnable 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
text
runtime example
|
+--> route-hints register
+--> RouteHint entity + codec
+--> standalone runtime assemblyUse these sources:
RuntimeExampleFactoryRuntimeConsoleApplication
Read with:
Shard Ownership / Owner Election
text
runtime example
|
+--> shard-owner lease collection
+--> blank entity factory
+--> lease renewal and transfer semanticsUse these sources:
RuntimeExampleFactoryRuntimeIntegrationTest
Read with:
Distributed Counters / CRDT
text
runtime example
|
+--> request-counter CRDT
+--> PnCounter update codec
+--> state codec + mergerUse 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 |
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.