Coordinating concurrent workers
Processing tasks in parallel without race conditions or leaking goroutines.
A channel-based queue feeds a fixed worker pool, and a graceful shutdown drains in-flight work and stops the goroutines cleanly.
TaskForge is a Cloud Tasks-inspired queue created as a portfolio project to explore backend fundamentals in Go. It allows tasks to be created, scheduled, listed, watched and cancelled through a gRPC API, a traditional CLI and an interactive terminal TUI. The project uses Protocol Buffers for the API contract, goroutines for concurrency, channels as the internal queue, a scheduler to dispatch delayed tasks and a worker pool to process jobs. It also includes retry handling with a simple backoff, a dead-letter state for tasks that exhaust their attempts and graceful server shutdown. It is deliberately scoped as a learning project: the store is in-memory, there is no authentication or database persistence yet, and the task handler is simulated with payloads like `fail` and `slow` to exercise the retry and dead-letter paths. The focus was concurrency and clean architecture, not production scale.
Requests arrive through the CLI or the TUI, hit the gRPC server and land in the task store. The scheduler moves due tasks into a channel-based queue, which a concurrent worker pool consumes — each job ending as completed, retried or dead-lettered.
Processing tasks in parallel without race conditions or leaking goroutines.
A channel-based queue feeds a fixed worker pool, and a graceful shutdown drains in-flight work and stops the goroutines cleanly.
Deciding what should happen when a task keeps failing.
Failed tasks retry with a simple backoff and, once they exhaust their attempts, move to a dead-letter state instead of blocking the queue.
Making the state of the queue easy to inspect straight from the terminal.
Beyond the CLI, an interactive TUI built with Bubble Tea and Lip Gloss shows a dashboard and lets you navigate tasks in real time.