On Dec 19, 2007, at 9:01 AM, Steve Midgley wrote:

> At 02:42 AM 12/19/2007, [EMAIL PROTECTED] wrote:
>> Message: 6
>> Date: Tue, 18 Dec 2007 12:34:54 -0600
>> From: "Mason Hale" <[EMAIL PROTECTED]>
>> Subject: Re: [Mongrel] Long-running pages cause mongrel time-outs
>> To: mongrel-users@rubyforge.org
>> Message-ID:
>>        <[EMAIL PROTECTED]>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Hi Ezra --
>>
>> I found it interesting that you recommended Bj (backgroundjobs) and
>> not
>> BackgrounDrb. I hadn't heard of Bj before, and I'll check it out.
>> Thanks for
>> the link. Given that you initiated the development BackgrounDrb, I'm
>> curious
>> when and where you would recommend Bj over BackgrounDrb.
>>
>> Mason



        Backgroundrb and Bj serve different purposes. The new backgroundrb is  
a complete rewrite by Hemant that throws out drb and uses an event  
driven styel of programming. It really is very stable now and it's  
main focus is on doing jobs that require reporting status in your  
rails app. Like if you want to fetch some news feeds and report a  
progress bar via ajax polling in your app. Bdrb works very well for  
this and other more real time background jobs.


        Bj is a work queue. You just shove jobs into the queue which is a  
database table and the Bj daemon will run through them and call each  
job one at a time. But you can also have Bj daemons on each node in a  
cluster of servers and have them all pulling from the same queue. Bj  
jobs are just shell commands. So your actual jobs can be ruby scripts,  
shell scripts, or script/runner calls.  The main idea behind Bj is  
that you could throw 100K jobs at it and it will just do them as fast  
as it can one at a time without overwhelming the system all at once.


        So both of these tools are very solid now, they just serve different  
purposes. Backgroiundrb is more for real time jobs and status reports  
as well as having a very nice cron like scheduler for jobs.  Bj is  
more of a work queue that is persistent.


        Hope that clears things up, Both of these tools are great for  
different circumstances.

Cheers-
- Ezra Zygmuntowicz
-- Founder & Software Architect
-- [EMAIL PROTECTED]
-- EngineYard.com

_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to