MDK Logo

Kernel modules

Per-module specs for @tetherto/mdk-kernel: responsibility, interfaces, state machines, recovery, and scaling.

Overview

Kernel's coordination splits across single-purpose modules. Each owns its own state, persistence boundary, and scaling characteristics. It communicates with the others only through its declared interface.

The Kernel's Architecture overview provides the canonical spec for each module's interfaces, state machine, and recovery behavior.

Modules

  • WorkerRegistry: maps deviceId to workerId to RPC channel, and drives each Worker through its registration lifecycle
  • CommandDispatcher: validates an incoming command, resolves the target device or devices, and hands off to the Command State Machine
  • CommandStateMachine: tracks every command's execution lifecycle in a write-ahead log
  • TelemetryCollector: a stateless proxy that routes telemetry queries to the Worker that owns the data
  • Scheduler: the system metronome that fires the recurring telemetry, health, and state jobs
  • HealthMonitor: pings every registered Worker on a cadence and marks dead ones unroutable
  • ActionManager: handles the write action approval lifecycle at the Kernel layer
  • ActionCaller: resolves an approved action into the per-Worker write calls that carry it out

Next steps

On this page