Costin Manolache wrote:
Jan-Henrik Haukeland wrote:

Don't forget that servlets ( which is the main job of tomcat ) use
blocking input/output streams.

NIO select ( which is what most people see first in NIO ) is not going to help in this. Select is extremely powerfull - but it requires a certain kind of event-based architecture which doesn't match the blocking model of servlets ( which has the big benefit of making things
simple for users ).


Think about it - in any case you do need one thread for each active request, for the servlet. Most of the time is spent in the service() method - you can do select() as much as you want in http/jk processing, but you must have the thread for service() ( which can't be avoided since servlets are allowed to block the thread ).

Only thing you can save is the static servlet - but for that you are better off using a real server or a cache.

It's sad people see select() first - and don't pay attention to char-byte convertors in NIO ( a huge ammount of optimization - tomcat
already has something that emulates the same model, so we won't benefit
much ), and the mmapping feature - which is huge for IPC and java-native
communication.

Well, we're using the C2B from NIO already. The old stuff is just wrappers around them, AFAIK. Of course, it would be more efficient to bypass the wrappers completely :)


For mem maps, I don't know. The direct buffers are rather annoying to manipulate, it seems.

It's good that we have a very efficient HTTP stack already, and we don't have to rush this stuff :-D

Rémy


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to