On 27/01/2012 21:03, bxqdev wrote: > > > On 1/27/2012 8:29 PM, Mark Thomas wrote: >> On 27/01/2012 14:53, bxqdev wrote: >>> Hello, Developers! >>> >>> 1. What are the premises to use either >>> apache.coyote.http11.Http11NioProtocol or >>> org.apache.coyote.http11.Http11NioProtocol connectors? >> >> There is no such protocol as "apache.coyote.http11.Http11NioProtocol" so >> if you try using it, that connector will fail to start. > > i assume you can guess that it's org.apache.coyote.http11.Http11NioProtocol
In which case they are identical since you are specifying the same class name. >>> 2. Do i get any advantages if i use Sync Servlet Api with >>> Http11NioProtocol connector >> Yes. > > What are they? As per the docs. You even quoted the comparison. >>> 3. How do i choose which one to use in any particular case? >> a) Understand your requirements >> b) Read the docs, particularly [1] >> c) Choose the connector that best meets your requirements. > > it's a bit abstract. I suspect you need to read up (generally) on the differences between blocking and non-blocking IO. > Java Blocking Connector Java Nio Blocking > Connector > BIO NIO > Classname Http11Protocol Http11NioProtocol > Tomcat Version 3.x onwards 6.x onwards > Support Polling NO YES > Polling Size N/A maxConnections > Read HTTP Request Blocking Non Blocking > Read HTTP Body Blocking Sim Blocking > Write HTTP Response Blocking Sim Blocking > Wait for next Request Blocking Non Blocking > SSL Support Java SSL Java SSL > SSL Handshake Blocking Non blocking > Max Connections maxConnections maxConnections > > It doesn't show how that corresponds to Sync vs Async Servlet APIs. Because there is no correlation. > actually it's interesting to know about the following cases: > 1. Sync Servlet + Non Bloking NIO Connector > 2. Async Servlet + Bloking IO Connector Know what? They both work. How well they work will depend on many factors outside of Tomcat's control. > How are connector and servlet code related? Again, read the docs: http://tomcat.apache.org/tomcat-7.0-doc/architecture/requestProcess/requestProcess.pdf It is slightly old and probably not completely correct in all details for 7.0.x but should be good enough. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org