RailsConf2008 の非同期処理に関する話題
RailsConf2008 で、Jonathern Dahl さんが Rails での非同期処理について話すみたいです
- RailsConf 2008: Asynchronous Processing with Ruby on Rails
適当に訳すと...
Rails は HTTP リクエストな同期処理はいい感じにこなしてくれるけど、ちょっと複雑な処理や時間のかかる処理をしたいと思うと非同期処理が必要になる。だから非同期処理をはじめてみよう。ちょっと調べてみると、Rails で非同期するにはこんな方法がある。cron, BackgroundDRb, AP4R, daemons, そして AmazonSQS。実際の事例とコードを通じで、それぞれの良いとこ/悪いとこを順にみてみるよ。
ほとんど同じ内容ですが、こっちにもう少し詳しく書かれています。Jonathern と仲間うちのエンジニアで投稿しているサイトっぽいです。書籍の紹介とほかの非同期ライブラリ、starling, workling, beanstalk, spawn, background_fu あたりへの言及が増えてますね。
AP4R についてはどんな話をしてくれるんだろ... (^^;
- Rail Spikes: See you at RailsConf '08
http://railspikes.com/2008/2/25/speaking-railsconf-2008
It looks like I will be speaking at RailsConf again. This time, I’ll be discussing asynchronous processing.
If you've worked on a Rails app that strays beyond basic CRUD, you've probably had to think about running some actions in the background – that is, outside of the HTTP request/response cycle. I've had to worry about this on quite a few projects, and contributed a recipe to the forthcoming Advanced Rails Recipes book. The recipe discussed how to package a Ruby script as a daemon, which is a simple and powerful approach to background processing. But there are quite a few others, including (but not limited to): AP4R, cron, starling, workling, beanstalk, backgroundrb, spawn, background_fu, and Amazon SQS. And I've left out quite a few.
So as I prepare for the conference, I'd love your feedback. What options have you tried? What has worked well or worked poorly? What would you like to see at the conference?
紹介されている書籍はこちら。Jonathern は "Asynchronous recipes" として、"Processing an Asynchronous Workflow" と "Off-Loading Long-Running Tasks to BackgrounDRb" というレシピを書いているみたいです。
Advanced Rails Recipes: 84 New Ways to Build Stunning Rails Apps (Pragmatic Programmers)
- 作者: Mike Clark,Chad Fowler
- 出版社/メーカー: Pragmatic Bookshelf
- 発売日: 2008/05/01
- メディア: ペーパーバック
- 購入: 1人 クリック: 5回
- この商品を含むブログ (7件) を見る
もうひとつ、ついでに紹介。こちらは、reliable-msg の作者、Assaf Arkin さんの書籍となりますが、この中でも AP4R が登場しているそうです。たぶん、第7章の "Asynchronous messaging" のとこ。
- 作者: Jeremy McAnally,Assaf Arkin
- 出版社/メーカー: Manning Publications
- 発売日: 2009/04/07
- メディア: ペーパーバック
- クリック: 1回
- この商品を含むブログ (1件) を見る
どちらも発売は初夏なので手にできるのはまだ先ですが、楽しみです。
# あ、β版ならもう買えるな...
それぞれの目次や詳しい内容、および現時点での購入はこちらから。
- The Pragmatic Bookshelf | Advanced Rails Recipes
http://www.pragprog.com/titles/fr_arr
- Manning: Ruby in Practice