How kalbhor/tasqueue works
Main Components
a) Core Components:
• Task Queue Server
• Broker Interface (with implementations)
• Results Interface (with implementations)
• Job Processor
• Task Registry
b) Supporting Components:
• Job Types (Single Jobs, Groups, Chains)
• Results Store
• Message Queue
Top Layer: Client Interface
Middle Layer: Task Queue Server Components
Bottom Layer: Storage & Message Queue Infrastructure
Component Relationships
a) Client Layer:
• How clients can create and enqueue Jobs, Groups, and Chains
• Result retrieval flow
b) Server Layer:
• Task Registry connection to Job Processor
• Job Processor interaction with Broker Interface
• Results Interface interaction with Results Store
Implementation Details
• Blue rectangles: Core interfaces (Broker, Results)
• Green rectangles: Concrete implementations (Redis, NATS-JS)
• Yellow diamonds: Job processing components
• Purple rectangles: Job types (Single, Group, Chain)
Specific Elements
a) Broker Interface (show all implementations):
• In-Memory Broker
• Redis Broker
• NATS-JS Broker
b) Results Interface (show all implementations):
• In-Memory Results
• Redis Results
• NATS-JS Results
c) Job Processing Flow:
• Job Creation
• Task Registration
• Job Processing
• Result Storage
Key Workflows to Illustrate
a) Job Processing Pipeline:
Client → Server → Broker → Processor → Results Store
b) Chain Processing:
Job1 → Result1 → Job2 → Result2 → Job3
c) Processing:
• Job1 →
Job2 → Results Store
• Job3 →
Important Details to Note
• Queue names and concurrency settings
• Error handling and retry flows
• Where atomic operations are guaranteed
Technical Specifications
• Queue names (default: "tasqueue:tasks")
• Concurrency settings
• Supported broker types
• Result storage options
The result storage and retrieval mechanism
• Flow direction indicators
This system design should capture both the high-level architecture and the important implementation details while maintaining clarity and readability.