Skip to content

Open Source Distributed Coordination

Distributed Shared Memory for Enterprise Java Services

DSM gives service teams a runtime-first coordination layer for replicated registers, lease-backed ownership, and CRDT state. The documentation is organized for real integration work: start with a guide, keep the reference open, and use scenario cookbooks when you need a recommended pattern.

  • Registers, leases, and CRDTs in one runtime surface
  • HMAC signing, replay protection, and admission validation
  • Spring Boot and standalone wiring built around the same API
Guide-first docsMove from getting started to Spring Boot or standalone integration without leaving the site.
Reference-readyRuntime API, collection builders, handle contracts, and Spring properties are documented directly.
Scenario cookbooksUse the routing, shard ownership, and distributed counter patterns as implementation templates.

Replicate routing hints, feature flags, and control-plane metadata with deterministic runtime registration and explicit collection boundaries.

  • Best for shared metadata
  • Explicit tenant/application/collection IDs
  • JDK-only runtime core
Register collection
DsmRuntime runtime = DsmRuntimeBuilder.builder()
    .clusterId("prod-cluster")
    .serviceId("gateway-service")
    .membership(membership)
    .build();

runtime.register(CollectionSpecBuilder.<RouteHint>register(
        "shared",
        "gateway",
        "route-hints")
    .schemaId("route-hints/v1")
    .codec(new RouteHintCodec())
    .build());

Platform highlights

A runtime surface built for control-plane data, not platform sprawl.

DSM focuses on the problems enterprise teams actually have to solve: metadata replication, shard ownership, consistent routing, and observability that matches operational reality.

MM

Multi-Model Collections

Registers, lease collections, and CRDT collections share one runtime contract so teams can choose the right consistency primitive per workload.

HA

High Availability

Runtime sync, anti-entropy repair, crash recovery, and graceful shutdown flows are designed for long-lived production clusters.

SC

Enterprise Security

HMAC message signing, replay protection, and admission validation protect replication channels without forcing a heavyweight stack.

CL

Flexible Clustering

Choose standalone, multicast, or unicast gossip membership based on your deployment topology and trust boundaries.

SB

Spring Boot Reference

Starter and autoconfiguration modules expose the runtime facade and collection handles with explicit YAML configuration and documented validation rules.

RF

Reference-First Documentation

The site now covers runtime APIs, collection builders, handle contracts, Spring properties, and scenario cookbooks alongside conceptual docs.

From API to operations in three steps

Model the collection once, then keep the same runtime path through production.

DSM keeps collection modeling, runtime wiring, cluster sync, and operator-facing diagnostics aligned. The documentation follows the same sequence: guide first, reference second, operations and architecture when needed.

01

Define

Register collections through a runtime-first API where tenant, application, and collection IDs are explicit instead of hidden behind framework magic.

Collection definition
CollectionSpecBuilder.<RouteHint>register(
        "shared",
        "gateway",
        "route-hints")
    .schemaId("route-hints/v1")
    .codec(new RouteHintCodec())
    .build();
02

Deploy

Wire DSM directly or let the Spring Boot starter assemble the runtime, membership, and configured collection handles from application properties.

Spring Boot config
dsm:
  cluster-id: runtime-example
  service-id: gateway-service
  cluster:
    mode: unicast
  collections:
    - bean-name: routeHintsCollection
      tenant-id: shared
      application-id: gateway
      collection-id: route-hints
      type: REGISTER
      codec-bean: routeHintCodec
03

Operate

Read runtime snapshots, cluster membership state, lease-specific diagnostics, and metrics callbacks without bolting on a second observability model.

Diagnostics API
RuntimeDiagnostics diagnostics = runtime.diagnostics();

int totalEntries = diagnostics.totalEntries();
ClusterView clusterView = diagnostics.clusterView();
List<CollectionDiagnostics> collections = diagnostics.collections();
List<LeaseCollectionDiagnostics> leaseCollections = diagnostics.leaseCollections();

Start in minutes

Choose the integration path that matches your service boundary.

The same runtime contracts support direct Java wiring for embedded services and explicit Spring Boot configuration for platform-standard deployments. After the first setup, use the reference pages and scenario cookbooks as the day-to-day implementation manual.

Maven dependency

pom.xml
<dependency>
  <groupId>com.leanowtech.dsm</groupId>
  <artifactId>dsm-core</artifactId>
  <version>${dsm.version}</version>
</dependency>

Minimal runtime

Java runtime
DsmRuntime runtime = DsmRuntimeBuilder.builder()
    .clusterId("runtime-example")
    .serviceId("gateway-service")
    .membership(new StandaloneClusterMembership(self))
    .build();

runtime.start();
→ Read the full Getting Started guide