Hi all,
I have a situation where a very simple request can trigger a time-
consuming operation, but the requesting page doesn't need the result
of the lengthy computation. In the standard controller action of
handling the http request, it appears that ack'ing the request is
closely coupled with completing the request. Can this be altered in
order to separate these two actions in time?
Presumably, the return of the ack frees the browser and allows the
user to continue doing whatever. However, what condition causes the
web server to send another request to this same rails instance? What
would happen if the ack was sent, freeing the browser, but the rails
app kept crunching on the data? How does the web server know when the
rails app is done? Does the rails app get called like a proc and just
return to the web server?
I know that this answer will vary based on whether the web server is
Apache or mongrel or thin or nginx, but I would like to understand how
the controller code wraps up an action.
Can someone point me towards a writeup somewhere?