Skip to content

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-support

Runnable Examples In dsm-examples

Code entryWhat it showsRead with
com.leanowtech.dsm.examples.runtime.RuntimeConsoleApplicationMinimal standalone process that starts a runtime and keeps it aliveGetting Started, Standalone Quickstart
com.leanowtech.dsm.examples.runtime.RuntimeExampleFactoryOne register, one lease, and one CRDT wired into the same runtimeRuntime API, Collection Specs
com.leanowtech.dsm.examples.springboot.SpringBootDsmApplicationSpring Boot entrypoint for DSM runtime startupSpring Boot, Spring Properties
com.leanowtech.dsm.examples.springboot.RuntimeSpringBootConfigurationSupporting codec, merger, and entity-factory beans for Spring BootSpring Boot, Collection Handles
com.leanowtech.dsm.examples.repl.DsmReplInteractive REPL over a shared register collection using multicast discoveryGetting Started, Collection Types

Scenario Mapping

Service Discovery / Routing

text
runtime example
	|
	+--> route-hints register
	+--> RouteHint entity + codec
	+--> standalone runtime assembly

Use these sources:

  • RuntimeExampleFactory
  • RuntimeConsoleApplication

Read with:

Shard Ownership / Owner Election

text
runtime example
	|
	+--> shard-owner lease collection
	+--> blank entity factory
	+--> lease renewal and transfer semantics

Use these sources:

  • RuntimeExampleFactory
  • RuntimeIntegrationTest

Read with:

Distributed Counters / CRDT

text
runtime example
	|
	+--> request-counter CRDT
	+--> PnCounter update codec
	+--> state codec + merger

Use these sources:

  • RuntimeExampleFactory
  • RuntimeSpringBootConfiguration
  • RuntimeIntegrationTest

Read with:

Integration Tests In dsm-integration-test

Test classWhat it provesRead with
TwoNodeIntegrationTestManual two-node register replication with fake membership and explicit sync servicesService Discovery & Routing, Diagnostics
RuntimeIntegrationTestLocator isolation, CRDT counter merges, and lease fencing behaviorCollection Types, Shard Owner Election, Distributed Counters
SecurityIntegrationTestSigned payload verification and tamper rejectionObservability, 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

  1. Read the guide that matches your integration path.
  2. Open the mapped example entrypoint or test class from this page.
  3. Keep the matching reference or cookbook page open while copying the pattern.
  4. Use the troubleshooting pages when the example works but your service does not.