π¨ TaskForge

A distributed task queue system built with Go, demonstrating distributed systems patterns and fault-tolerant design.
β¨ What TaskForge Shows
Distributed Systems Implementation
- Redis Streams with consumer groups for message delivery
- Worker engine with Observer, Command, and Bulkhead patterns
- Circuit breakers and rate limiting for fault tolerance
- Exponential backoff retry with jitter and dead letter queues
Go Code Practices
- SOLID principles with dependency injection
- Interface-driven design for pluggable components
- Error handling and structured logging
- Concurrent processing with resource management
Design Patterns
- Factory and Strategy patterns for extensibility
- Observer pattern for event monitoring
- Bulkhead isolation to prevent cascade failures
- Priority queues with FIFO ordering within levels
π Quick Demo
# Clone and setup
git clone https://github.com/2bxtech/taskforge.git
cd taskforge
go mod tidy
# Start Redis (requires Docker)
docker run -d -p 6379:6379 redis:7-alpine
# Try the demos
make redis-demo # Redis queue backend demo
make worker-demo # Complete worker engine demo
make demo-all # Run both demos
οΏ½οΈ Architecture Overview
Core Components
- Queue Backend: Redis Streams implementation with consumer groups
- Worker Engine: Task processing with resource management
- Task System: 6 task types (webhook, email, image, data, scheduled, batch)
- Observability: Event monitoring with health tracking
Features
- Consumer groups, retries, dead letter queues
- Batch operations, connection pooling, priority scheduling
- Circuit breakers, bulkhead isolation, graceful degradation
- Health checks, metrics collection, event tracking
π Project Status
Phase 1 Complete: Core architecture and type system
Phase 2A Complete: Redis Queue Backend with consumer groups
Phase 2B Complete: Worker Engine with fault tolerance patterns
Built and tested - Functional distributed task queue system.
π§ Development
# Build all components
make build
# Run tests
make test
# Run integration tests (requires Redis)
make test-integration
# Try the demos
make redis-demo # Redis queue backend demo
make worker-demo # Worker engine with fault tolerance
make demo-all # Run both demos sequentially
π Project Structure
βββ pkg/types/ # Public interfaces and types
βββ internal/queue/ # Redis queue implementation
βββ internal/worker/ # Worker engine with fault tolerance
βββ cmd/ # Application entry points
βββ examples/ # Working demonstrations
βββ tests/integration/ # Integration test suite
π― Technical Implementation
- Go 1.22 with concurrency patterns
- Redis Streams for distributed queuing
- Interface-driven design with pluggable backends
- Testing with race detection and coverage
- Working demos showing functionality
A distributed task queue system built with Go and Redis.