tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <>
Subject Re: Proposed new CometEvent.notify method
Date Thu, 03 May 2007 02:15:56 GMT
Remy Maucherat wrote:
> Hi,
> To more conveniently support some use cases, a new notify method could 
> be added to the event. This would do an action callback and call a new 
> method in the Poller class would add the socket to a structure like the 
> socket add list. The comet poller thread will then check if there are 
> sockets in that list, and call an event (as for the event type, it could 
> be a regular timeout - it's very similar - or a new type which will 
> behave the same as timeout - which would be significantly harder since 
> modifications will have to be made to accommodate the new event type).
> I know how to make this fairly easily with the APR connector, and I'm 
> not so sure about the NIO one (most likely it's very similar, however). 
> The main thing which is annoying to implement is if the fact that there 
> will not be any other concurrent event occurring has to be enforced and 
> there are multiple pollers (I think the socket has to be removed "just 
> in case" from each poller, which is quite annoying).

Along with it, I think a semi dynamic option should be added to not use 
read polling (which does funky stuff in certain cases, since when using 
pipelining, there's data available but the data may actually not belong 
to this request), but still check timeout. I think per connection 
timeout should also be supported by APR. Having these in addition to 
notify() would allow all possible usage scenarios without running into 
funny corner cases.


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

View raw message