Overview
The Developer Guide shows how to use Clustron DKV to build applications using:
- Key-value operations
- Coordination primitives
- Distributed-safe patterns
What You Will Learnβ
In this section, you will learn how to:
- Connect to a store
- Store and retrieve data
- Work with bulk and batch operations
- Use leases, locks, and counters
- React to changes using watch
- Build transactional workflows
The Developer Workflowβ
Most applications follow a simple flow:
Get Client β Perform Operations β Add Coordination β Handle Errors
1. Get a Clientβ
All operations start with a client.
You obtain a client using dependency injection:
var client = await provider.GetAsync("default");
2. Perform Data Operationsβ
Use simple APIs to store and retrieve data:
await client.PutAsync("key", "value");
var result = await client.GetAsync<string>("key");
3. Add Coordinationβ
For distributed scenarios, use coordination primitives:
- Leases β ownership with expiration
- Locks β exclusive access
- Counters β shared state
- Watch β event-driven updates
4. Build Advanced Workflowsβ
You can combine features to build more complex systems:
- Batch operations for efficiency
- Transactions for grouped operations
- Scan and query for data processing
Same API Everywhereβ
All APIs work the same in:
- InProc mode
- Distributed mode
You do not need to change your application code when scaling.
Design Philosophyβ
Clustron is designed to be:
- Simple to use
- Safe under failure
- Consistent across environments
You interact with distributed systems using the same patterns as local code.
How This Guide is Organizedβ
The Developer Guide is structured by capability:
- Getting a Client β setup and initialization
- Basic & Bulk Operations β working with data
- Leases & Locks β ownership and coordination
- Watch & Counters β reactive and shared state
- Transactions β complex workflows
- Options & Error Handling β production readiness
Whatβs Nextβ
π Continue to Getting a Client to initialize your application