Wednesday, September 23, 2009
Background Tasks (Daemon Processes, Threads) and JRuby
Some months ago, Engine Yard posted 5 Tips for Deploying Background Jobs which was mostly aimed at Ruby vs. JRuby, but still applicable, and comments on that post were helpful as well. Since then (and before then), there has been talk on the jruby-user list about how best to run tasks in the background. Yes, you can use cron (or similar) kick off scripts or setup stuff in init.d (or similar) to start them on boot. And things like spawn to just kick off stuff (be sure to read my related post on testing with spawn). But the last few days, James Herdman started a good thread on this on the jruby list where people came up with some other suggestions and thoughts which are well worth a read. Check it out here.