Skip to content

Releases: azutoolkit/joobq

v0.4.1

19 Nov 16:22
Compare
Choose a tag to compare

Full Changelog: v0.4.0...v0.4.1

Release Notes

We are pleased to announce significant improvements and refactorings to the Queue(T) class and related components in the JoobQ system. These updates enhance metrics accuracy, code maintainability, performance, and adherence to SOLID principles. Below is a concise summary of the changes:


1. Enhanced Metrics Calculations

  • Accuracy Improvements:
    • Separated Rate Calculations: Introduced per_second_rate and percentage_rate methods.
    • Correct Time Initialization: Initialized total_job_wait_time and total_job_execution_time to zero.
    • Consistent Elapsed Time: Added elapsed_time method for accurate time tracking.
  • Benefits: Metrics now accurately reflect queue performance, ensuring reliable monitoring and decision-making.

2. Removed Redundant Metric

  • Eliminated Metric: jobs_per_worker_per_second.
  • Reason: It was redundant and could be derived from existing metrics.
  • Benefits: Simplified codebase and reduced computational overhead.

3. Simplified Total Jobs Enqueued Calculation

  • Change: Removed the total_jobs_enqueued property.
  • Approach: Calculated dynamically using existing metrics:
    [
    \text{total_jobs_enqueued} = \text{size} + \text{completed.get} + \text{dead.get} + \text{busy.get}
    ]
  • Benefits: Ensured consistency in job counts and simplified state management.

4. Introduced Average Jobs In-Flight Metric

  • New Metric: average_jobs_in_flight.
  • Purpose: Measures the average number of jobs being processed concurrently.
  • Calculation:
    [
    \text{Average Jobs In-Flight} = \frac{\text{Total Job Execution Time}}{\text{Elapsed Time}}
    ]
  • Benefits: Provides insights into worker utilization and helps optimize processing.

5. Refactored Code Following SOLID Principles

  • Single Responsibility Principle:
    • Separated concerns into Queue(T), Metrics, and WorkerManager classes.
  • Dependency Inversion Principle:
    • Introduced interfaces (IStore, IWorker) to depend on abstractions.
  • Other Principles:
    • Adhered to Open/Closed, Liskov Substitution, and Interface Segregation principles.
  • Benefits: Improved maintainability, extensibility, and testability.

6. Improved Worker(T) Class Structure

  • Focus on Job Execution:
    • Worker class now solely handles job execution.
  • New Components:
    • Throttler Class: Manages rate limiting.
    • FailHandler Class: Handles job failures and retries.
  • Benefits: Enhanced code clarity, metrics accuracy, and error handling.

7. Corrected Queue Reduction Rate Calculation

  • Fix: Removed .abs from queue_reduction_rate to preserve the sign.
  • Result: Accurately indicates whether the queue size is increasing or decreasing.
  • Benefits: Provides true insights into queue behavior for better operational decisions.

8. Addressed Low Worker Utilization

  • Issue: Worker utilization was low (e.g., 0.14%).
  • Actions:
    • Diagnosed potential causes like insufficient job load or excessive workers.
    • Recommended increasing job volume, adjusting worker count, and optimizing configurations.
  • Benefits: Improved resource efficiency and system performance.

General Enhancements

  • Thread Safety: Ensured with atomic operations and proper synchronization.
  • Logging and Monitoring: Enhanced for better visibility and debugging.
  • Exception Handling: Strengthened across components for robustness.
  • Documentation: Updated to reflect changes and improve clarity.

We encourage all users to update to the latest version to benefit from these improvements. Your feedback is valuable and helps us continue enhancing the JoobQ system.

v0.4.0

16 Nov 15:24
Compare
Choose a tag to compare

Release Notes for JoobQ

For a complete list of changes, please refer to the commit history.
Full Changelog: v0.3.1...v0.4.0

Version 0.4.0

New Features

  • Queue Throttling: Introduced the ability to throttle queues to control the rate of job processing.
  • Dead Letter Queue: Added support for a dead letter queue to handle jobs that fail after exhausting retries.
  • Job Expiration: Implemented job expiration to ensure that only valid jobs are processed.
  • REST API Enhancements: Expanded the REST API to include endpoints for job registry and queue metrics.
  • Scheduler Enhancements: Improved the scheduler to support recurring jobs and cron-based scheduling.

Improvements

  • Logging: Enhanced logging capabilities for better traceability and debugging.
  • Retry Logic: Improved retry logic with exponential backoff to avoid overwhelming the system.
  • Worker Management: Added support for graceful worker shutdown and controlled job execution.
  • Configuration: Simplified queue configuration with the JoobQ.configure method.

Bug Fixes

  • Fixed issues with job enqueuing and dequeuing in the Redis store.
  • Resolved race conditions in worker job processing.
  • Addressed bugs related to job status updates and metrics tracking.

Documentation

  • Updated README with new features and usage examples.
  • Added detailed documentation for the new REST API endpoints.
  • Improved inline code comments for better code understanding.

Miscellaneous

  • Updated dependencies to the latest versions.
  • Refactored code for better readability and maintainability.

v0.3.1

28 May 19:20
Compare
Choose a tag to compare
Adds support for redis password

v0.3.0: [Breaking Change] Remove method overload

30 Jul 11:55
Compare
Choose a tag to compare
Changes
- `SomeJob.perform(within)` is now `SomeJob.delay(for)`
- `SomeJob.run(every)` is now `SomeJob.schedule(every)`

v0.2.6

30 Jul 11:40
Compare
Choose a tag to compare
Scheduler config

v0.2.5

30 Jul 01:44
Compare
Choose a tag to compare
Better Configuration

v0.2.4

27 Jul 12:52
Compare
Choose a tag to compare
Lock redis version

v0.2.3

05 Jul 10:49
Compare
Choose a tag to compare
Uses inline ON_DUPLICATE policies

v0.2.2

23 May 13:11
Compare
Choose a tag to compare
Merge pull request #4 from azutoolkit/updates

Adds adds run method

v0.2.1

24 Apr 13:12
6a1c47c
Compare
Choose a tag to compare
Merge pull request #3 from azutoolkit/updates

Updates