Question

I know there are several plugins that do asynchronous processing. Which one is the best one and why?

The ones I know about are:

Was it helpful?

Solution

starling and workling seem pretty interesting (see the screencast) if you might have several such process, and you want to queue them.

you might also be interested by the previous screencast that use rake for background process, and by the future one that will probably be about another solution to the same question.

OTHER TIPS

I'll add DJ (Delayed Job) to the list - http://blog.leetsoft.com/2008/2/17/delayed-job-dj

The github guys recently gave it a great review: http://github.com/blog/197-the-new-queue

Whether something is the 'best' solution really depends on what the problem is you're trying to solve. In some cases the best solution will be the most lightweight solution, in other the most heavyweight.

BackgroundRb is probably the most fully-featured Rails background job processor, but it's also the most complicated so will require more investment to get to grips with it. BackgroundRb can probably handle most use cases, from the simple to the complex.

I have heard very good things about Ara T. Howard's Background Job (Bj) which, to quote the README is a brain dead simple zero admin background priority queue for Rails. This is a much more lightweight solution and may be preferable to BackgroundRb for a majority of scenarios as a result.

If all you want is a solution for infrequent offline batch-style processing then script/runner which comes with all Rails apps would be more than adequate.

For further reading you might want to look at HowToRunBackgroundJobsInRails from the Rails Wiki.

Resque can help you, too.

It's a very nice tool for creating background jobs, placing those jobs on multiple queues, and processing them later.

The Github's guys have created and use it.

The article below may help you get started:

http://rubylearning.com/blog/2010/11/08/do-you-know-resque/

Starling + Workling plugin is dead simple. Plus, it uses Memcached which is simple, tested and scalable.

BackgrounDRb - Pros: Full featured, messaging, Cons: Threaded (eek - Rails isn't thread safe!), complex

Daemon Generator - Pros: Simple, runs jobs and thats it!, Cons: None of that fancy messaging stuff.

We use Cron. Easy to set up, easy to maintain, and it Always Works.

BackgroundRb will eat your brain.

BackgrounDRb is not threaded, its completely process based. It only has a feature of thread pools which user can use, if he wants to handle IO bound tasks concurrently.

Try 1.1 release and let me (on my blog) or on mailing list know about any issues.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top