Hello,
maybe someone on this list can help me. I am trying to implement a sort
of long
database search. In order inform the user about what’s happening, status
messages should be displayed to the user while the request is working.
e.g.
- starting search process
- currently searching through database A
- found 10 results
- currently searching through database B
- found 25 results
- currently searching through database C
- found 35 results
- …
- done
No, I’ve implemented this proposed solution:
http://rails.techno-weenie.net/question/2006/6/12/status_messages_during_a_long_running_action
but this does not work the way it’s assumed to work. What happens is
that the
status information is displayed only after the search request has
concluded
the entire process.
As far as I understand, there’s a limitation with concurrent requests on
behalf
of the browsers. However, I am wondering, whether anybody, by any
chance, might
have run into a solution for this or maybe, has a work around.
Greetings
Michael K.
leave ajax. move to iframe.
via the iframe you can send snippets with
statusmessages/ progressbars, during the (long) processes.
regards,
robert
2006/7/9, Michael K. [email protected]:
Nope, I’ve tried that too. When you’re using an iframe, you still need
to send a
second request to the server in order to receive the status information
of the
first request.
It’s not working either.
Greetings
Michael K.
I also had the same problem, even when I switched to lighty it seemed
only one outstanding request
could be made, and the periodic status requests didn’t get through until
the first request finished.
I solved the problem using backgroundrb too, it worked and has a nice
example of how to do status
updates.
I had the same problem, but it was because i was using webrick for
development.
You need a multithread webserver such as apache or lighttpd. I haven’t
tried it with mongrel.
Another solution, a little more complex, but more impressive is
backgroundrb… here is the link
http://brainspl.at/articles/tag/background
Roland