I have users upload files, which are then parsed into a database.  The 
parsing takes a non-trivial amount of time (few minutes) so I want the user 
to see progress messages.  I have been poking at this problem for several 
days.  I could use some advice on the general approach, or verification that 
I am on the right track.

  It looks like AJAX is the tool.  It would be OK for the client to poll the 
server for the parsing progress, though comet web-push would be ideal. 
 Simple text responses would be fine, rather than a progress bar; something 
like "1234 of 2345 lines processed, 4 new, 1230 duplicates ignored".

  I have found some examples of using jQuery with web.py, so I have an idea 
of the how to format the AJAX calls.  However, I can't quite see how to line 
it all up.

  The client needs a loop to periodically poll the server, but where should 
that loop be?  As Javascript in the template file?  In one of the Python 
methods?  Somewhere else?

  Meanwhile, the server would be doing the parsing.  Where would that be 
happening?  In the web.py application?  As a separate subapplication or 
thread or queue or multiprocess?  If so, how can I get the AJAX call to it?

  Somebody must have done something similar, but I haven't stumbled on the 
right search terms.

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/webpy/-/8IuxNct9YmwJ.
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/webpy?hl=en.

Reply via email to