tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <>
Subject Comet changes
Date Sun, 06 May 2007 16:39:15 GMT

To summarize, I propose the following additions in the Comet 
functionality for the next Tomcat 6.0 release (the various names are 
proposals, I am not very good at names):
- per event timeout becomes mandatory
- small refactoring of the timeout callback using an action code rather 
than a request attribute (the reason for using request attributes for 
sendfile is because I needed it in the Servlet layer, which doesn't have 
access to the action callback)
- refactor a bit the poller for the APR endpoint and add per connection 
timeout support; I also don't like the multiple poller threads design 
anymore - it is only useful on Windows, and would be replaced by using a 
single thread with multiple pollers and a shorter pollTime
- notify method on the event (wakes a connection from the endpoint, and 
invoke a NOTIFY event)
- add NOTIFY as a new CometEvent.EventType
- add a CometEvent.disableReadPolling() method which will signal that 
the connection should not be put in the poller, but should still be 
checked for timeout
- EOF as a new ComentEvent.EventSubType, subtype of CometEvent.EventType 
.END (will be called when the endpoint signals a read); after getting 
this event, the CometAdapter could automagically call 
CometEvent.disableReadPolling() to avoid problems if the client somehow 
sends additional bytes (they don't belong to this request)
- possible improvements for available() to be proposed by Filip

These should be relatively easy to implement, and should allow 
supporting additional use cases.

I will not propose any non blocking IO changes at this time, as I don't 
have a solution where the complexity would not increase quite a bit for 
both Tomcat and the "Servlet" code. So since it is blocking IO, certain 
uses will still need to make use of more than one thread for output (to 
compensate for the risk of blocking).

Comments ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message