News for hackers. Stuff that matters.
Re:Rails 4 will establish a new background job queueing API by thibaut_barrere on Friday April 27, 2012 @10:58AM (#3899321)
Coupled with that, I would love to see Passenger support background workers with the same lifecycle as front-end workers (but last time I suggested that, it wasn't planned at all if I remember well).
Re:Rails 4 will establish a new background job queueing API by pkmiec on Saturday April 28, 2012 @12:54AM (#3902070)
We implemented something like this at the place I work.

We have a tiny ruby process, based on event machine, that subscribes to various queues (we happen to use RabbitMQ). When a message arrives, the process makes a request to the passenger instance passing along the message data and waits for a response. The process limits the number of requests it makes to prevent background requests from blocking out front-end requests (for example, 20% of passenger_max_pool_size). We're also simulating priority by using different prefetch values for different queues (for example, 10 messages for high queue and 5 messages for low queue).