Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 88D3517CE8 for ; Fri, 3 Oct 2014 13:41:18 +0000 (UTC) Received: (qmail 85268 invoked by uid 500); 3 Oct 2014 13:41:18 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 85227 invoked by uid 500); 3 Oct 2014 13:41:18 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 85216 invoked by uid 99); 3 Oct 2014 13:41:18 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Oct 2014 13:41:18 +0000 Received: from [10.0.0.8] (10-165.62-188.cust.bluewin.ch [188.62.165.10]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 041A41A0042 for ; Fri, 3 Oct 2014 13:41:06 +0000 (UTC) Message-ID: <1412343673.9045.5.camel@ubuntu> Subject: Re: NIO Selector client From: Oleg Kalnichevski To: HttpComponents Project Date: Fri, 03 Oct 2014 15:41:13 +0200 In-Reply-To: References: <1412324241.2315.1.camel@ubuntu> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit On Fri, 2014-10-03 at 15:31 +0200, Marc Larue wrote: > Hi Oleg, > > I'm guessing that the HAC uses many threads for async/concurrency? > > If you use a selector, you can async all requests on the network layer > instead of a thread pool, which scales alot better. > > But maybe thats allready how HAC works? I searched the code for 'selector' > but couldn't find any. > HttpAsyncClient uses the same number of I/O dispatch threads as physical CPU cores by default, but one can force it to use one thread only. Oleg > Kind Regards, > > /marc > > On Fri, 3 Oct 2014, Oleg Kalnichevski wrote: > > > On Thu, 2014-10-02 at 19:37 +0200, Marc Larue wrote: > >> Hi, > >> > >> Have you considered writing a single threaded selector.select() driven > >> HTTP client? > >> > > > > Marc, > > > > I am not sure I understand. How exactly would that differ from > > HttpAsyncClient? > > > > http://hc.apache.org/httpcomponents-asyncclient-4.0.x/index.html > > > > Oleg > > > >> This would be very efficient and allow for Java HTTP load balancing! > >> > >> Kind Regards, > >> > >> /marc > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org > >> For additional commands, e-mail: dev-help@hc.apache.org > >> > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org > > For additional commands, e-mail: dev-help@hc.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org > For additional commands, e-mail: dev-help@hc.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org