Skip to content

Open Source Distributed Coordination

Distributed Shared Memory for Enterprise Java Services

Local-looking code. Distributed consistency and coordination built in.

After registering a collection, call put, acquire, or apply. DSM packages replication, conflict resolution, fencing, convergence, and repair into the runtime your service already owns.

REGISTERHow do all service instances share the latest route hint?
YOUR SERVICE WRITES1 operation
routeHints.put(
    new RouteHint(
        "orders",
        EntityMetadata.empty(),
        "10.0.0.12:8443"));

One local-looking put(...)

ADD ONE DEPENDENCYdsm-runtime
  • Lineage stamp
  • Delta replication
  • Digest + replay
DSM MAKES TRUE4 capabilities

Healthy peers repair toward the same route hint.

  • Local-first writeCommit without waiting on a peer round trip.
  • Deterministic resolutionMetadata gives competing values a stable order.
  • Peer-visible stateTyped deltas move the update across the service family.
  • Missed-update repairDigest, replay, or snapshot catches lagging peers up.

REGISTER capability stage 1 of 4.

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

Repair-Oriented Runtime

Runtime sync combines delta flow, proactive anti-entropy, adaptive replay/snapshot repair, and relay health gating for long-lived clusters.

SC

Secure Envelopes

HMAC signing, replay protection, admission validation, sender bans, and optional payload encryption protect replication channels.

RC

Schema-Safe Records

RecordCodec schema fingerprints and structured error codes make incompatible payload rollouts visible instead of silently corrupting state.

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.

FD

Federation Baseline

Cross-cluster federation supports register repair, lease observation, and CRDT delta propagation through an explicit relay SPI.

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
1CollectionSpecBuilder.<RouteHint>register(2        "shared",3        "gateway",4        "route-hints")5    .schemaId("route-hints/v1")6    .codec(new RouteHintCodec())7    .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
1dsm:2  cluster-id: runtime-example3  service-id: gateway-service4  cluster:5    mode: unicast6  collections:7    - bean-name: routeHintsCollection8      tenant-id: shared9      application-id: gateway10      collection-id: route-hints11      schema-id: route-hints/v112      type: REGISTER13      entity-type: com.example.RouteHint14  sync:15    anti-entropy:16      sweep-enabled: true
03

Operate

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

Diagnostics API
1RuntimeDiagnostics diagnostics = runtime.diagnostics();2 3int totalEntries = diagnostics.totalEntries();4ClusterView clusterView = diagnostics.clusterView();5List<CollectionDiagnostics> collections = diagnostics.collections();6List<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
1<dependency>2  <groupId>com.leanowtech.dsm</groupId>3  <artifactId>dsm-runtime</artifactId>4  <version>${dsm.version}</version>5</dependency>

Minimal runtime

Java runtime
1DsmRuntime runtime = DsmRuntimeBuilder.builder()2    .clusterId("runtime-example")3    .serviceId("gateway-service")4    .membership(new StandaloneClusterMembership(self))5    .build();6 7runtime.start();
→ Read the full Getting Started guide