Sign inSign up

aarkam/aarkam.kdouja

By aarkam

•Updated 1 day ago

High-throughput Sovereign NVMe Storage, Large Payload Chunks, Dual Embedded/gRPC Daemon, Zero-Cgo

Image
0

137

aarkam/aarkam.kdouja repository overview

⁠Aarkam Kdouja — Sovereign LSM & Direct-I/O Storage Engine

⁠Autonomous Log-Structured Merge Storage Engine, Direct NVMe PageStore & High-Throughput Substrate

Version Docker Image Target OS Architecture Compliance Air-Gapped


⁠1. What is Kdouja?

Aarkam Kdouja is the high-performance autonomous storage engine of the Aarkam Sovereign Data Fabric. Operating directly on bare-metal NVMe drives and containerized enterprise substrates, Kdouja delivers sub-millisecond point lookups, zero-allocation LSM memory structures, hardware-level Direct I/O block allocation, and native AES-256 Write-Ahead Log (WAL) durability across sovereign cloud environments.

Kdouja serves as the foundational storage substrate for:

  1. Aarkam Rokka: Powers local object catalog indexing, bucket metadata tables, and high-frequency SSTable deduplication.
  2. Aarkam Abodi: Powers unbuffered 66,048-byte physical block allocations, Cauchy shard placement, and direct NVMe queue saturation.
  3. Autonomous Edge Nodes: Operates as a zero-dependency, self-contained embedded storage engine or network daemon (kdoujad) with dedicated inspection tooling (kdouja-cli).

Engineered strictly for zero-egress, air-gapped sovereign datacenters, Kdouja operates with complete autonomy—requiring zero external database dependencies (no Redis, no ZooKeeper), zero third-party internet callbacks, and zero native C++ redistributable packages.


⁠2. Quick Start

⁠Pull the Image
docker pull aarkam/aarkam.kdouja:latest
# or explicit version
docker pull aarkam/aarkam.kdouja:v1.0.1

⁠3. Usage Modes

⁠Mode A: Autonomous Storage Daemon (kdoujad)

Run Kdouja as an autonomous background daemon exposing high-throughput gRPC services (KeyValueService and StorageService) on port 57771:

docker run -d \
  --name kdouja-server \
  -p 57771:57771 \
  -v kdouja_data:/var/lib/kdouja \
  -e KDOUJA_BASE_DIRECTORY="/var/lib/kdouja" \
  -e KDOUJA_MEMTABLE_FLUSH_MB="32" \
  -e KDOUJA_ENABLE_DIRECT_IO="false" \
  aarkam/aarkam.kdouja:v1.0.1

Check server health:

curl http://localhost:57771/healthz

⁠Mode B: Enterprise CLI & Inspector (kdouja-cli)

Use the bundled kdouja-cli tool to query keys, inspect SSTables, view WAF/RAF metrics, and trigger compactions:

# Display engine diagnostics in structured JSON
docker run --rm \
  -v kdouja_data:/var/lib/kdouja \
  aarkam/aarkam.kdouja kdouja-cli info --dir /var/lib/kdouja --json

# Store a key-value record
docker run --rm \
  -v kdouja_data:/var/lib/kdouja \
  aarkam/aarkam.kdouja kdouja-cli kv put "config:mode" "sovereign" --dir /var/lib/kdouja --json

# Read a record in table format
docker run --rm \
  -v kdouja_data:/var/lib/kdouja \
  aarkam/aarkam.kdouja kdouja-cli kv get "config:mode" --dir /var/lib/kdouja --table

# Trigger manual SSTable compaction pass
docker run --rm \
  -v kdouja_data:/var/lib/kdouja \
  aarkam/aarkam.kdouja kdouja-cli compact --dir /var/lib/kdouja --json

⁠4. Why Kdouja Wins Against Competitors

Metric / CapabilityAarkam KdoujaRocksDB (Meta)Pebble (CockroachDB)BadgerDB (Dgraph)
ArchitectureHybrid LSM + Direct-I/O PageStorePure LSM-TreePure LSM-TreeLSM + Value Log (WiscKey)
Kernel Cache BypassingYes (O_DIRECT / Unbuffered)Complex manual setupNo (OS Page Cache)No (OS Page Cache)
Write Amplification (WAF)Low (1.2–3.5x on payloads)High (10–30x)High (10–25x)Low (2–4x)
Built-in DaemonNative gRPC (kdoujad)None (Library only)None (Library only)None (Library only)
Runtime DependenciesZero (.NET 8/10 Managed)C++17 runtime libsGo runtimeGo runtime
Hardware EncryptionNative AES-256 WALCustom plugin requiredNoneNative AES-256

⁠5. Environment Variables

VariableDefaultDescription
KDOUJA_BASE_DIRECTORY/var/lib/kdoujaPath to persistent database directory
KDOUJA_MEMTABLE_FLUSH_MB32Size threshold in MB to flush MemTable to L0 SSTable
KDOUJA_MAX_L0_FILES4Number of L0 SSTables before triggering compaction
KDOUJA_ENABLE_DIRECT_IOfalseEnable unbuffered Direct I/O (O_DIRECT) on Linux
KDOUJA_PAGE_SIZE4096Direct I/O page allocation size in bytes (4KB)
KDOUJA_ENABLE_WAL_FSYNCtrueForce hardware fsync barrier on every commit
KDOUJA_WAL_KEY(Auto-generated)64-character hex AES-256 key for WAL at-rest encryption
DOTNET_CLI_TELEMETRY_OPTOUT1Disables telemetry for hardened air-gapped environments

⁠6. Persistent Volumes

Mount PathDescriptionRecommended Usage
/var/lib/kdoujaDatabase data directory (SSTables, WAL, PageStore)Mount high-speed NVMe block volume
/etc/kdoujaStatic configuration overridesMount custom appsettings.json

⁠7. Docker Compose Example

version: '3.8'

services:
  kdouja:
    image: aarkam/aarkam.kdouja:v1.0.1
    container_name: aarkam-kdouja
    restart: unless-stopped
    ports:
      - "57771:57771"
    environment:
      - KDOUJA_BASE_DIRECTORY=/var/lib/kdouja
      - KDOUJA_MEMTABLE_FLUSH_MB=64
      - KDOUJA_ENABLE_WAL_FSYNC=true
      - KDOUJA_ENABLE_DIRECT_IO=false
    volumes:
      - ./kdouja_data:/var/lib/kdouja
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:57771/healthz"]
      interval: 10s
      timeout: 3s
      retries: 3

⁠8. Security & Sovereign Compliance

  • Saudi NCA ECC-2:2024 & FIPS 140-3: Cryptographic isolation, authenticated memory bounds, and native AES-256 WAL encryption at rest.
  • 100% Air-Gapped: Runs entirely offline in disconnected data centers.
  • Zero Kernel Thrashing: Sector-aligned Direct I/O eliminates dirty-page memory leaks on long-running nodes.
  • Documentation: https://github.com/aarkamio/Aarkam.Kdouja⁠

Tag summary

Content type

Image

Digest

sha256:0faba8e5f…

Size

98.7 MB

Last updated

1 day ago

docker pull aarkam/aarkam.kdouja