tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <>
Subject Re: cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common
Date Sun, 24 Apr 2005 19:29:03 GMT

----- Original Message ----- 
From: "Remy Maucherat" <>
To: "Tomcat Developers List" <>
Sent: Sunday, April 24, 2005 1:49 AM
Subject: Re: cvs commit: 

> wrote:
>> billbarker    2005/04/23 21:27:42
>> Modified:    jk/java/org/apache/jk/common Log: Give 
>> up on switching between blocking/non-blocking Sockets, also move
>> the Accecpt into the Poller instead of its own thread.
>> This is still very much experimental, and nobody should even dream of
>> using it in production.
>> Testing on Windows, it's very flakey.  On Solaris, it's stable
>> enough, but ChannelSocket is about 25% faster.
>Does it do about the same of behavior as the APR endpoint ? (I didn't try 
>it - I run Windoze for my dev, BTW ;) )

ChannelNioSocket works ok on Windows on low concurrency, but what's the 
point? ;-).  After that, NIO starts throwing weird NPEs.

I haven't tried the APR endpoint on Solaris yet.  If I get some time, I'll 
try compiling it and give it a spin.  However the NIO tests suggest that 
PoolTcpEndpoint will win. There is just not much downside to simply 
increasing maxThreads on Solaris, but the additional syncs and 
context-switching do cost.

>I would like AJP and HTTP to share more code. Do you think that NIO is a 
>better choice, or should it remain an experiment ? To me, it seems less 
>mature, robust and portable (the most annoying problem probably being that 
>to get bugfixes and feature updates, you need to upgrade the JVM), but I 
>don't have a whole lot of experience.

Most of the split was because Costin designed Jk-Coyote around the JNI 
stuff. Also, at the time PoolTcpEndpoint didn't support the master-slave 
model he settled on.

Actually, I'm thinking of leaving ChannelNioSocket in mostly to have 
something to point to when people show up on the list asking "why doesn't 
Tomcat use this great NIO stuff?". ;-)  The non-blocking io actually works 
well for AJP (since all of the reads and writes are at most 8K).  Using 
ByteBuffer vs byte [] seems mostly a matter of taste :).  Otherwise, I agree 
that NIO should probably remain an experiment for now.

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

This message is intended only for the use of the person(s) listed above as the intended recipient(s),
and may contain information that is PRIVILEGED and CONFIDENTIAL.  If you are not an intended
recipient, you may not read, copy, or distribute this message or any attachment. If you received
this communication in error, please notify us immediately by e-mail and then delete all copies
of this message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet
is not secure. Do not send confidential or sensitive information, such as social security
numbers, account numbers, personal identification numbers and passwords, to us via ordinary
(unencrypted) e-mail.

View raw message