How jobrunr/jobrunr works
Core Components
a. Job Scheduling Layer
• Fire-and-forget jobs (BackgroundJob.enqueue)
• Delayed jobs (BackgroundJob.schedule)
• Recurring jobs (BackgroundJob.scheduleRecurrently)
• JobRunr API interface that accepts job submissions
b. Processing Layer
• Job execution engine
• Worker thread pools
• Job state management
• Retry mechanism with back-off policy
c. Storage Layer
• RDBMS (PostgreSQL, MySQL, Oracle, SQL Server, DB2)
• NoSQL (MongoDB, Redis, ElasticSearch)
• Storage tables/collections:
• Jobs table
• Recurring jobs table
• Background job servers table
• Job stats
d. Dashboard Component
• Web-based dashboard showing:
• Job monitoring interface
• Real-time statistics
• Server status
• Job management controls
Integration Points
a. Framework Support
• Integration with:
• Spring Boot
• Quarkus
• Micronaut
• Plain Java
b. Monitoring & Metrics
• Connections to:
• Health checks
• Metrics (MicroMeter)
• Logging system
Flow Patterns
• Job submission flow from applications to scheduler
• Job distribution to background servers
• State changes and persistence
• Dashboard data flow
• Health check and metrics reporting
Clustering & Distribution
Illustrate:
• Multiple background job servers
• Job distribution mechanism
• Cluster coordination
• Load balancing
Important Notes
Callouts highlighting:
• Distributed nature of the system
• Fault tolerance capabilities
• Persistent storage backing
• Horizontal scaling ability
• Smart retry mechanism