Distributed Task Queue in Kotlin using Coroutines
Build a distributed job queue where multiple worker processes pull tasks from Redis, execute them concurrently using Kotlin coroutines, and report results back, with retry and dead-letter handling. Learners practice coroutine channels, distributed system fundamentals, and fault-tolerant worker design.
- Estimate
- ~10h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
Coroutines · Redis · Ktor
Project roadmap
- 01
Design the queue protocol
~1.5hDefine task and result message formats and a Redis-backed queue structure.
- 02
Build the worker pool
~2.5hImplement a coroutine-based worker pool that pulls tasks from Redis and processes them concurrently.
- 03
Add retry and dead-letter logic
~2hTrack failed task attempts and move exhausted tasks to a dead-letter queue.
- 04
Expose a submission API
~2hBuild a small Ktor HTTP endpoint for submitting tasks and checking their status.
- 05
Add monitoring and graceful shutdown
~2hExpose queue metrics and ensure workers finish in-flight tasks on shutdown.
Resources
- DocsKotlin Docs
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack