On Mon, May 11, 2009 at 10:04 PM, fbettag <[email protected]> wrote:
> is there any way to give such jobs (which require no further user
> interaction) into the background?

You've got a couple of options.

Merb has a feature called run_later, which allows you to specify a
block in your controller actions which will run outside of the request
response. This might be a low impact way of solving your problem.

http://merbivore.com/documentation/current/doc/rdoc/stack/index.html?a=M001465&name=run_later

The other option you could look at is using a message queue. When your
users request a report, you add that request to the queue and you have
a separate background process which services those requests and
generates the reports.

Geoffrey Grosenbach does a really good job of explaining this here,
even though its a few months old:
http://nubyonrails.com/articles/about-this-blog-beanstalk-messaging-queue

-- 
/tooky

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to