tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject Re: Ongoing stuff
Date Tue, 16 May 2006 23:06:58 GMT
Costin Manolache wrote:
> For example, I would assume what you need is:
> 1. a servlet to tell tomcat to not close the connection ( "I'm not done, 
> but
> I'm going to sleep waiting for events for a while" )
> 2. a way for a thread/event to tell tomcat to resume a particular request,
> and
> 3. a way for tomcat to wake up a servlet if some activity happens on the
> client side.
> For 1 - I assume a tomcat-specific API or (special) request attribute is
> needed ( and service() to return ). Jetty uses a
> special exception, I don't think it's a good idea.
> For 2 - any reason for new API ? Could it just use the saved response 
> object
> ?
> For 3 - ??? Call service again with an extra attribute ?  Require servlets
> to implement an interface or to
> register with tomcat a callback ( maybe using setAttribute when going to
> sleep ) ?

Right now, I am using request attributes and an interface (but I will 
add an abstract servlet as well). The interface is not mandatory in 
theory, but I think it's wrong to invoke the service method of a servlet 
more than once.

2: The processor is not recycled, so is still usable. Another thread can 
write to it using the request and response of the servlet API. That's 
the easy (and useful) part. BTW, this is why I need to optimize memory 
usage of a processor (right now, it tries a bit too much to save CPU at 
the expense of memory, so I need to balance it a bit more). You also 
need to optimize the memory usage of modeler.
3: It would call a method of the interface the servlet would implement 
(I have a "read" method for signaling new input, and an "error" method 
to end processing in case of problems). That's the useless (IMO) and 
"hard" (ok, not that hard, it uses the usual keepalive poller with a 
couple tweaks) part.

I didn't test all that stuff yet, but conceptually it looks ok.

Rémy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message