Progressive output on the views

There is one web page that because it request data from several web services, it delays between 20 and 200 seconds.

So my idea is to display the status of the data that is being fetched (or even the data as its being fetched) to the user, so he don't have to wait like 200 seconds thinking that perhaps the page is not working.

But until now, I always render the web pages totally at the end of the action in the controller.

What I need now, is to be able to display the view on the beginning of the action, and then to be able to throw javascript code to refresh the content of the same page, and finally throw a javascript redirection at the end of the view.

Any idea of how to archive progressive output in rails?

Thank you

Rodrigo Dominguez

I don't think rails can stream requests like that at all. You could however have some javascript on the page periodically talking to your server to see if the data is ready for them