Johnny Kewl wrote:

----- Original Message ----- From: "Filip Hanik - Dev Lists" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Friday, February 22, 2008 5:59 PM
Subject: Re: NIO Java or TC - What are u using it 4?


you're subject has an "or" in it, what are you actually asking?

What kind of projects make one want to move away from normal HttpServlets and start using the NIO stuff that TC has... I understand that it gives one all sorts of async control over the servlet... but I just cant think of examples of when one would use it. Occasionally I see a question or two here, and I'm wondering what practical things
designers are using these "power" sockets for.

There are lots of articles like this one....
http://www.ibm.com/developerworks/library/j-nioserver/
ok, well most likely the servlet spec will one of these days introduce non blocking IO as well, but it will be while, it's a very complex programming model, and in most cases one doesn't need it. if you want async servlets (ie, decouple threads from the connection) then as Bill mentioned, Comet will do an excellent job. switching to something like the link above, you're now dealing with software outside the spec, which in some cases is not a problem, but in other cases can have consequences for a growing project, or a project that needs to be integrated elsewhere.



They espouse the "power" side... but no concrete examples of applications... Its not like people are all diving at it... so I'm wondering if there are times when its the only way to go... Also in TC there is another APR handler, how does that relate to NIO, when will one want to use any of these
over the normal, and when APR and when NIO?
Just trying to understand it... practical examples sounds like a good way to start...
Thanks...


To give you an example of the different connectors and how they differ, in a one-to-one scenario, NIO will always be slower, since it has to do "simulated blocking" to accomodate the current servlet spec. When it comes to SSL, no java connector compares to the APR/OpenSSL, JSSE is simply not optimized enough (yet).

                Java Blocking Connector       Java Nio Blocking Connector       
APR Connector
   Classname         Http11Protocol                  Http11NioProtocol         
Http11AprProtocol
   Tomcat Version   3.x 4.x 5.x 6.x                       6.x                   
  5.5.x 6.x
   Support Polling         NO                             YES                   
     YES
   Polling Size           N/A                   Unlimited - Restricted by mem   
     Unlimited
   Read HTTP Request     Blocking                     Non Blocking              
     Blocking
   Read HTTP Body        Blocking                     Sim Blocking              
     Blocking
   Write HTTP Response   Blocking                     Sim Blocking              
     Blocking
   SSL Support           Java SSL                     Java SSL                  
     OpenSSL
   SSL Handshake         Blocking                     Non blocking              
     Blocking
   Max Connections       maxThreads                   See polling size          
     See pollsize


Filip


Filip

Johnny Kewl wrote:
Cant contain my curiousity anymore?
What practical applications is this been used for?
I see theres a lot of control over the socket etc... but what are you guys actually doing with it?
Trying to get  rule of thumb for when one would move to it?


---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
Making the Java dream come true.
--------------------------------------------------------------------------- ------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.20.9/1293 - Release Date: 2/22/2008 9:21 AM



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to