On 1/28/2012 1:53 AM, Mark Thomas wrote:
On 27/01/2012 21:31, bxqdev wrote:

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.

There is no "IO" connector. Tomcat 7 supports three connector variants:
BIO, NIO&  APR/native. There are separate implementations of each for
the HTTP and AJP protocols.

well, i mean bio and nio connectors for http.


I suspect you need to read up (generally) on the differences between
blocking and non-blocking IO.

i know the differences.

Then why are you asking such basic questions about the differences
between non-blocking IO and blocking IO?

nevermind.


but it looks like there's 2 points of choice:
1. nio vs. io in connectors
2. nio vs. io in servlet api

There is no NIO support in the Servlet spec. The Servlet API uses
entirely blocking IO throughout.

There is Async support in Servlet 3.0 onwards which could be viewed as a
form of non-blocking IO I guess but is really just a way to de-couple
writing to the response and the thread processing the request/response pair.

yes, that's what i call async servlet api.


i don't understand how this choices are related.

They aren't. If you want to understand what Servlet 3.0 async is, you
need to read the Servlet 3.0 spec.

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?

No fundamental changes. Replace thread pools with executors and the
detail of the Protocol / Processor / Endpoint relationships (which is
important to understand as soon as you starting working with the code)
isn't shown but you don't really need that. Also, the Async behaviour
isn't shown.

ok, so what about this case:
http nio  connector + async servlet
i would say that in this variant there're 2 points of asynchronism -
both connector and servlet code are async.
is there a case when i would need such a combination?


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

Reply via email to