cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ronnie Bahlsten" ...@globecom.se>
Subject Re: [Cocoon Users] Re: Determine if the user hits stop button?
Date Thu, 21 Sep 2000 13:03:44 GMT
No not PDF.

We're kind of building a "backend" platform.
The processes involved to create the documents are "heavy".
Now, each request (from client) results in a long chain of programs,
subsystems and (our platform) engine doing some work, and finally push
everything back in the chain to the client. Average time to generate pages is about one second.
However, some of the more complex searchroutines really take some time to finnish.
If a user decides that *heck, did it crash?, i stop and reload* the old process will still
be
working in the background to finnish.

Now, pretend that this happens on a site where many (simultaniously) users causes 
data flows back and fourth to server and client _all_ the time. 
This (for example) consumes database licenses and increases the load on 
the poor server trying to handle the rest of the clients.

At this very moment, we are 4 developers that simultaniously access the system, with a requesttime
that can be acceptable if the system is used properly. But, as everybody knows, there is not
a 
single user in the world that is as careful and nice to a system as the programmer ;)

I don't think we can afford having uneccessary processes working in the background.
Since apache writes "Connection reset by peer" in its logfiles, it must somehow be aware of
when
the users hits the stop button. It would have been great to be able to catch an exception
or something
when this occurs.

It might even be possible to recode some parts of apache to further notify the servlets of
this particular events ? 

Pardon my lousy English.
/ Ronnie


> Hello,
> I have a rather silly idea how to circumvent your problem. It's rather
> dummy but it should work:
> 
> 1) user submits form via POST or GET
> 
> 2) you fork the CPU-intensive work (now _that's_ the difficulty) and store
> its results in the session variable, while you redirect the user to a
> pseudo "wait screen" ("please wait while calculating your data - you will
> automatically be redirected when processing is done").
> 
> 3) Within the wait screen's <head> you put a content refresh meta tag of
> (ETA)*(current machine load).
> 
> 4) when the wait screen refreshes, you serve the results of processing,
> unless of course the work isn't done yet, in which case you jump off to
> step 2.
> 
> Is it PDF rendering you're stuck?
> 
> HTH,
> 
> Elias Karakoulakis
> Undergraduate student at the National Technical University of Athens
> ekarak@softlab.ece.ntua.gr
> 
> "United we stand, divided we fall"
> 
> On Wed, 20 Sep 2000, Michael Engelhart wrote:
> 
> > > I'm wondering if there is a way to determine if the user has hit
> > > the stop button. Reasons for this is that each time a page is
> > > requested, a really heavy process is started that starts up another one
> > > that starts up another one that starts up another one... you get the point
;) 
> > > 
> > > Is it apache that knows of such things? And is it possible to be  
> > notified about
> > > this ?
> > 
> > Ronnie,
> > 
> > This is not possible in the current servlet engines.
> > 
> > Mike
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> > 
> > 
> 
> 
> 


Ronnie Bahlsten

Application Engineer
-------------------------------
GlobeCom AB, Business Solutions
Klostergatan 14 
222 22 Lund
Tel: 046 - 288 88 31
Mobil: 0701 - 85 00 31
Fax: 046 - 288 88 15
E-post: rb@globecom.se

Mime
View raw message