Jan-Henrik Haukeland wrote:Remy Maucherat <[EMAIL PROTECTED]> writes:My opinion is that NIO is going to be really useless.
Eh, hello!? Oh, okay if it's not important that Tomcat scale and perform well it may be useless. But, really, before NIO it was hopeless to try and write a scalable and fast tcp server application in Java. Tomcat's current connection handling with blocing all over the place and "thundering herd" problem doesn't scale or work very well under heavy load.
Only thing you can save is the static servlet - but for that you are better off using a real server or a cache.
But as Remy mentioned:
Static content is handled with a regular (well, almost) servlet, and all those requests have to go through the filter pipeline (ie, user components). This is the exact same problem when having Apache serve
static files.
So unless you break the spec, you still will need to spawn a thread to process static content through the filter pipeline.
If that happens to be OK for your application, then you are right, better to use a real server or cache in front of your application (like Squid www.squid-cache.org).
-Dave
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]