Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 18ACE924F for ; Fri, 27 Jan 2012 21:31:48 +0000 (UTC) Received: (qmail 11246 invoked by uid 500); 27 Jan 2012 21:31:43 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 11146 invoked by uid 500); 27 Jan 2012 21:31:43 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 11137 invoked by uid 99); 27 Jan 2012 21:31:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2012 21:31:42 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [97.107.133.207] (HELO li63-207.members.linode.com) (97.107.133.207) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2012 21:31:33 +0000 Received: from [192.168.1.2] (ppp83-237-0-185.pppoe.mtu-net.ru [83.237.0.185]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mymail) by li63-207.members.linode.com (Postfix) with ESMTPSA id BE6723625F for ; Fri, 27 Jan 2012 16:31:12 -0500 (EST) Message-ID: <4F2317A2.4020705@themailbay.com> Date: Sat, 28 Jan 2012 01:31:14 +0400 From: bxqdev User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Connectors: Http11Protocol vs. Http11NioProtocol References: <4F22BA4C.7070205@themailbay.com> <4F22D0E6.3090009@apache.org> <4F231123.105@themailbay.com> <4F2313C7.8020301@apache.org> In-Reply-To: <4F2313C7.8020301@apache.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org