On 1/28/2012 1:14 AM, Mark Thomas wrote:
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.
oh, i see. well, nio or io connectors. that's what i mean.
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.
i know the differences. but it looks like there's 2 points of choice:
1. nio vs. io in connectors
2. nio vs. io in servlet api
i don't understand how this choices are related.
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.
great. i thought there was though.
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.
ok.
How are connector and servlet code related?
Again, read the docs:
http://tomcat.apache.org/tomcat-7.0-doc/architecture/requestProcess/requestProcess.pdf
i will. didn't know about the existence of that document.
It is slightly old and probably not completely correct in all details
for 7.0.x but should be good enough.
that's bad. maybe you could explain in few words, as an expert?
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org