tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Attila Szegedi" <szege...@freemail.hu>
Subject Re: nbio connector
Date Wed, 09 Jan 2002 09:59:02 GMT

----- Original Message ----- 
From: "Remy Maucherat" <remm@apache.org>
To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
Sent: 2002. január 8. 19:19
Subject: Re: nbio connector


> 
> I agree on both the points above.
> Especially the first one actually, since you can avoid wasting a thread on
> waiting, and use all of them to do active work if needed.
> For the second point, Catalina uses a servlet to do the static files
> serving. I suppose the connector could do some optimization and serve some
> resources itself, but that's a bit complex, and not as clean as the current
> solution.

Or, the default servlet could check if the response is instanceof non-blocking response and
supply it with the appropriate file channel for response body; the response would take care
of instructing the connector to transfer the file using the direct filesystem cache-to-socket
transferTo() method in its own non-blocking code. This way, the majority of the logic would
be inside a connector; the servlet would only have few lines of additional code inside an
if(resp instanceof ...) block

> 
> I like that difference between a fun optimization and a useful optimization
> :)
> At the moment, a lot of useful optimization work still has yet to be done.
> 

I believe someone on this list once said something like "open source development: have fun
or get paid for it". I'm working on NIO solely because it's a fun new technology in Java with
a huge potential, and if it happens to turn out useful it's a clear win. :-)

Attila.

> 
> Remy
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>
> 
> 

Mime
View raw message