Forum: Ruby on Rails Best way to perform lengthy operations?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3a6666f57152610f172a77c8fe6a7420?d=identicon&s=25 marcus (Guest)
on 2006-03-04 11:48
(Received via mailing list)
What is the best way to handle lengthy operations with Rails (lengthy in
this case could be a minute or even more)? I want to give response to
the user about what is happening so I guess polling the server with ajax
is one way to get data to the browser.

But what do I do with the lengthy operation? I mean, the best as I see
it would be to make the first request (the one that triggers the lengthy
operation) asynch and that I somehow spawn a new thread, calls another
ruby process or something that performs the operation and the other
thread/process updates the database that the UI can use to provide data
to the user.

How would you go about doing this? Would you do it differently? Is there
some fantastic thing built into Rails to handle things like these? A
marvelous plugin maybe?

Thanks

/Marcus
This topic is locked and can not be replied to.