Skip to main content

Coordination Model

Clustron DKV provides a set of primitives that allow multiple application instances to coordinate safely using shared state.

These primitives are built on top of:

  • Key-value storage
  • TTL and lifecycle management
  • Leases (ownership + expiration)

The Core Idea​

Coordination in Clustron is based on:

Shared state + controlled ownership + automatic recovery

This allows distributed applications to behave predictably, even under failure.


Available Primitives​

Clustron provides three core coordination primitives:

  • Locks β†’ control exclusive access
  • Counters β†’ maintain shared numeric state
  • Watch β†’ react to changes in real time

Locks​

Locks ensure that only one client can access a resource at a time.

Example Use Cases​

  • Prevent duplicate job execution
  • Ensure only one worker processes a task
  • Protect critical sections

Key Properties​

  • Exclusive ownership
  • Safe under failure (via leases)
  • Automatically released if the owner fails

Counters​

Counters allow multiple clients to safely update shared numeric values.

Example Use Cases​

  • Tracking active workers
  • Rate limiting
  • Distributed metrics

Key Properties​

  • Atomic updates
  • Consistent across nodes
  • No manual synchronization required

Watch​

Watch allows clients to observe changes to keys or prefixes.

Example Use Cases​

  • Reacting to configuration changes
  • Monitoring state transitions
  • Triggering workflows

Key Properties​

  • Real-time notifications
  • Works across distributed nodes
  • Eliminates polling

How It Fits Together​

All coordination primitives are built on the same foundation:

Keys β†’ TTL β†’ Leases β†’ Coordination
  • Keys store state
  • TTL manages lifetime
  • Leases manage ownership
  • Coordination primitives build on top

Why This Matters​

Without a unified model, distributed systems often require:

  • Separate systems for locking
  • Separate systems for messaging
  • Manual coordination logic

Clustron provides:

  • A single system
  • A consistent API
  • Built-in safety and lifecycle management

Design Philosophy​

Clustron’s coordination model focuses on:

  • Simplicity
  • Safety under failure
  • Predictable behavior

You interact with coordination primitives the same way you interact with data.


What’s Next​

πŸ‘‰ Continue to the Developer Guide to see how to use locks, counters, and watch in code