Need advice about which tool to choose?Ask the StackShare community!

delayed_job

52
65
+ 1
6
Resque

119
126
+ 1
9
Add tool

Resque vs delayed_job: What are the differences?

Introduction: Resque and delayed_job are two popular job processing libraries in Ruby on Rails. While both provide similar functionality, there are key differences between them that developers should consider when choosing one for their project.

  1. Implementation: Resque uses Redis as its backend to store job data, while delayed_job relies on a database table to store job information. This difference in implementation affects performance and scalability. Redis, being an in-memory datastore, provides faster and more efficient job processing, especially when dealing with large volumes of jobs.

  2. Failure Handling: Resque has a built-in retry mechanism for failed jobs, allowing developers to specify a maximum number of retries. On the other hand, delayed_job does not have built-in retry functionality, but it provides hooks to implement custom error handling logic. This difference in failure handling can be important for applications that require robust error recovery and job resiliency.

  3. Scheduling: While both Resque and delayedjob allow for asynchronous job execution, Resque also provides scheduling capabilities. Developers can schedule jobs to run at specific times or intervals, which can be useful for performing tasks at a later time or for recurring background jobs. Delayedjob does not have built-in scheduling functionality and requires external libraries or custom implementations to achieve the same functionality.

  4. Dependencies: Resque has a minimal set of dependencies, making it easy to integrate into existing Rails applications. Delayed_job, on the other hand, has more dependencies, including Active Record or an ORM adapter, which may require additional configuration and overhead. This difference in dependencies may affect the ease of integration and the overall performance of the job processing system.

  5. Job Priority: Resque allows developers to assign priority levels to jobs, which can be useful when dealing with different types of jobs that require different levels of attention. Delayed_job does not have built-in support for job priorities, and developers would need to implement custom logic to achieve the same functionality.

  6. Community and Documentation: Resque has a larger and more active community, with extensive documentation and resources available. It is well-maintained and widely used in production environments. Delayed_job, while also popular, may have relatively fewer resources and less active community support. Choosing between the two may depend on the level of community engagement and the availability of resources for troubleshooting and support.

In Summary, Resque and delayed_job have key differences in their implementation, handling of job failures, scheduling capabilities, dependencies, job priority support, and community support. These differences should be considered when selecting a job processing library for a Ruby on Rails project.

Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of delayed_job
Pros of Resque
  • 3
    Easy to get started
  • 2
    Reliable
  • 1
    Doesn't require Redis
  • 5
    Free
  • 3
    Scalable
  • 1
    Easy to use on heroku

Sign up to add or upvote prosMake informed product decisions

What is delayed_job?

Delayed_job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background. It is a direct extraction from Shopify where the job table is responsible for a multitude of core tasks.

What is Resque?

Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both.

Need advice about which tool to choose?Ask the StackShare community!

What companies use delayed_job?
What companies use Resque?
Manage your open source components, licenses, and vulnerabilities
Learn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with delayed_job?
What tools integrate with Resque?
    No integrations found
    What are some alternatives to delayed_job and Resque?
    Sidekiq
    Sidekiq uses threads to handle many jobs at the same time in the same process. It does not require Rails but will integrate tightly with Rails 3/4 to make background processing dead simple.
    RabbitMQ
    RabbitMQ gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.
    MySQL
    The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.
    PostgreSQL
    PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions.
    MongoDB
    MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
    See all alternatives