Jun'uary

Backgroundrb vs BJ

Jan 发表于 2008-07-22 15:21:04

From ruby forum.
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
-- ezra@engineyard.com
-- EngineYard.com
关键词(Tag): job rails worker background queue


收藏: QQ书签 del.icio.us 订阅: Google 抓虾

最新评论

发表评论

* 昵称

已经注册过? 请登录

新用户请先注册 以便能显示头像及追踪评论回复

Email
网址
* 评论
表情
 
 

分类小组论坛
杂谈, 娱乐、八卦, 文学、艺术, 体育, 旅游、同城, 象牙塔, 情感, 时尚、生活, 星座, 科技

请注意遵守中华人民共和国法律法规, 如威胁到本站生存, 将依法向有关部门报告, 同时本站的相关记录可能成为对您不利的证据.

相关法律法规
全国人大常委会关于维护互联网安全的决定
中华人民共和国计算机信息系统安全保护条例
中华人民共和国计算机信息网络国际联网管理暂行规定
计算机信息网络国际联网安全保护管理办法
计算机信息系统国际联网保密管理规定

Jan'uary

人类一思考,老夫就发笑

搜索

日历