Skip to main content

Clustron ClientShell

The Clustron ClientShell PowerShell module provides command-line access to a Clustron Distributed Key-Value (DKV) store.

It allows administrators, developers, and operators to interact with a store without writing application code.

ClientShell is typically used for:

  • Testing store connectivity
  • Inspecting or modifying key-value data
  • Working with distributed counters
  • Managing leases
  • Observing changes in keys
  • Running performance benchmarks
  • Stress testing clusters

ClientShell communicates directly with DKV client endpoints exposed by store instances.


Installing the Module

ClientShell is distributed as the PowerShell module:

Clustron.DKV.ClientShell

Import the module:

Import-Module Clustron.DKV.ClientShell

Verify available commands:

Get-Command -Module Clustron.DKV.ClientShell

Connecting to a Store

Before executing most commands you must connect to a store.

Example:

Connect-DkvStore `
-StoreName OrdersStore `
-Servers 10.0.0.11:7101,10.0.0.12:7102

Check connection status:

Get-DkvConnection

Disconnect when finished:

Disconnect-DkvStore

Key-Value Operations

These cmdlets allow reading and writing items in the store.

CmdletDescription
Set-DkvItemStores or updates a key-value item
Get-DkvItemRetrieves a single item
Get-DkvItemsRetrieves multiple items
Remove-DkvItemDeletes an item
Remove-DkvItemsDeletes multiple items
Refresh-DkvItemRefreshes expiration
Set-DkvItemExpirationUpdates item expiration
Get-DkvItemMetadataReturns metadata for a key
Test-DkvItemChecks if a key exists

Example:

Set-DkvItem -Key "order:1001" -Value "confirmed"

Get-DkvItem -Key "order:1001"

Distributed Counters

Clustron provides atomic distributed counters that can be updated safely across cluster nodes.

CmdletDescription
Get-DkvCounterReturns the counter value
Increment-DkvCounterAtomically increments the counter
Decrement-DkvCounterAtomically decrements the counter
Set-DkvCounterSets a counter value

Example:

Increment-DkvCounter -Key "orders:processed"

Distributed Leases

Leases provide a distributed coordination primitive used for leader election, locks, and coordination.

CmdletDescription
Grant-DkvLeaseAttempts to acquire a lease
Refresh-DkvLeaseExtends a lease
Revoke-DkvLeaseReleases a lease
Test-DkvLeaseTests lease validity

Example:

Grant-DkvLease -Key "leader-election" -TtlSec 15

Observability and Watching Keys

ClientShell allows monitoring changes in the store.

CmdletDescription
Watch-DkvKeyWatches changes for a specific key
Watch-DkvPrefixWatches keys with a prefix

Example:

Watch-DkvPrefix -Prefix "orders:"

This continuously displays updates to matching keys.


Benchmarking and Performance Testing

ClientShell includes built-in benchmarking tools.

CmdletDescription
Benchmark-DkvStoreRuns a benchmark workload
Stress-DkvStorePerforms sustained load testing
Test-DkvLatencyMeasures request latency
Test-DkvThroughputMeasures cluster throughput

Example:

Test-DkvThroughput -DurationSec 30

Connection and Diagnostics

These cmdlets help validate connectivity and cluster health.

CmdletDescription
Connect-DkvStoreConnects to a DKV store
Disconnect-DkvStoreCloses the active connection
Get-DkvConnectionDisplays connection details
Test-DkvConnectionTests connectivity

Typical Workflow

A typical ClientShell session might look like this:

Connect-DkvStore -StoreName OrdersStore -Servers 10.0.0.11:7101

Set-DkvItem -Key "order:1" -Value "created"

Get-DkvItem -Key "order:1"

Increment-DkvCounter -Key "orders:processed"

Test-DkvThroughput -DurationSec 10

Related Documentation

  • Getting Started
  • Programmer Guide
  • Architecture
  • PowerShell AdminShell
  • API Reference