[Zope] Progress information for long running process

Jim Penny jpenny@universal-fasteners.com
Wed, 9 Apr 2003 12:57:24 -0400


On Wed, Apr 09, 2003 at 05:53:52PM +0200, Jan Maska wrote:
> 
> What about writing the process status into a log-file?
> After a user starts the process, redirect him to that logfile (e.g.
> HTML-type with a meta-refresh so that it updates) and let him watch the
> progress.
> 
> You may want him to return back, then.. well, in the final step, replace the
> self-refreshing metatag with one that passes the user back to wherever you
> want.
> 
> Just a workaround. :-)

My first reaction was, not pleasant.  On second thought, this is an
interesting idea.  Why?  I think that this immediatley frees up the Zope
thread, which is crucial.

Expanding on the email idea.  It is an honest one.  You are freeing up 
resources doing it that way, both computer resources and people resources.  

I don't like to watch progress bars that take 30 minutes to complete.  

More importantly, that progress bar is tying up a browser window on the 
client, probably a zope thread, and probably a bunch of other things 
I don't know about.  This sounds like a batch process.  Trying to make 
it appear to be interactive is probably a waste of everyones time.

The user probably cares about the following:
1)  knowing that the task was submitted
2)  knowing that he will be told when the task is done, and how to get
    it.
and 
3)  knowing what to do if the task seems to be taking too long, that is,
    how long too long is, and who to call if no email is forthcoming.  
    [this should be a part of the submission email.]

The user probably does not care to know 'I am at step 39 of 100, the
renormalization phase'.

If it is important to the user to know this kind of information, or the
users demand it, then do all the RESPONSE stuff.  Otherwise, avoid it.
The email idea is one way of avoiding the whole mess.  

The redirect to logfile is also interesting; it appears to have many 
of the same benefits as the email idea.  The only detriment is that 
the client has to keep the browser open to see that the job is
completed, and maybe even to see the job results.

Jim Penny

> Eddie M?nch wrote:
> >Hi All,
> >
> >Could someone help with this problem:
> >I have a long running process performed with an external method. Long
> >means > 30 min. At the and I'm giving back HTML code to the calling
> >object. What I need now is same sort of progress information on the web
> >page (e.g. Processing step 50 out of 100). Has anyone an idea how to do
> >this?
> 
> Actually, I would probably try something completely different.  I would
> immediately return something like:
> 
> 'Your job is being processed.  As this job takes a long time to perform,
> and there is no good reason to tie up you and your browser, I will send
> you an email when this is done telling you where you may pick up your
> results.'
> 
> Then send an email with an URI to the result.
> 
> Jim Penny
>