How kita99/narq works
Main Components
a) Core Components:
• Redis Database (central component)
• Worker System
• Timer System
• Web Interface/API Server
• Task Queue Manager
• Job Processing Pipeline
b) Integration Points:
• FastAPI Integration Interface
• Client Application Interface
Client Layer
• FastAPI integration point
• Client applications
Server Layer
• Web Interface (FastAPI-based)
• REST API endpoints
Core Processing Layer
• Worker system
• Timer system
• Task scheduler
• Job processor
Storage Layer
• Redis database
• Task queues
• Results storage
Key Relationships to Highlight
• Task submission flow (client → queue)
• Task processing flow (worker → task → result)
• Timer triggers (timer → task queue)
• API communications (web interface ↔ core system)
Specific Implementation Details
• Blue: Web interface components (server/templates, server/static)
• Green: Core processing components (worker.py, task.py)
• Yellow: Queue management (Redis)
• Orange: Timer system
• Purple: API endpoints (server/routes)
Special Features
• Cron task scheduling system
• Distributed task locking mechanism
• Task result storage and retrieval
• Queue management system
Architectural Patterns to Emphasize
Following patterns:
• Publisher/Subscriber pattern for task distribution
• MVC pattern in the web interface
• Async processing flow
• Distributed system communication
Component Details
• Main functionality
• Key dependencies
• Communication protocols
• Queue names and purposes
Additional Elements
Callouts for:
• Startup/shutdown hooks
• Task registration system
• Error handling flow
• Monitoring points
Key Considerations:
• Async nature of task processing
• How multiple workers can consume from multiple queues
• Timer's relationship with delayed and cron tasks
• Demonstrate how the web interface integrates with the core system
Remember to:
• Use clear, consistent symbols
• Version compatibility notes (Redis ≥ 5.0)
• Both standalone and integrated deployment options
• Scaling points in the architecture