Kathikon documentation

Copy Markdown View Source

Kathikon (καθήκον — duty, obligation) is a BEAM-native durable job queue for Elixir. Jobs are persisted in Mnesia, executed by OTP supervisors and dispatchers, and tracked through an explicit state machine.

Current release: v0.1.0 — Phase 1 (durable job queue)

Guides

Start here if you are new to the library:

GuideWhat you will learn
Quick startInstall, configure, define a worker, enqueue your first job
WorkersThe Kathikon.Worker behaviour, return values, errors
Queues & concurrencyMultiple queues, dispatcher concurrency, isolation
Schedulingschedule_in, schedule_at, scheduler promotion
Retries & errorsBackoff, max_attempts, discard, error recording
CancellationWhen jobs can be cancelled, API usage
TelemetryEvents, measurements, metadata, custom handlers
ConfigurationAll config :kathikon keys and environments
Storage & embeddingMnesia setup, Livebook, tests, backends

Reference

DocumentContents
Module referenceEvery module and public function with examples
Interactive demoLivebook walkthrough of Phase 1 features

Architecture at a glance

Kathikon.Supervisor
 Registry
 Kathikon.Queue          (DynamicSupervisor  one Dispatcher per queue)
 Kathikon.Scheduler      (promotes :scheduled  :available)
 Kathikon.Pruner         (deletes terminal jobs after retention)

Public API: Kathikon.insert/3, Kathikon.cancel/1, Kathikon.fetch/1, Kathikon.all/0, Kathikon.start_queue/1.