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 CA216104B3 for ; Wed, 4 Jun 2014 19:38:50 +0000 (UTC) Received: (qmail 96911 invoked by uid 500); 4 Jun 2014 19:38:50 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 96873 invoked by uid 500); 4 Jun 2014 19:38:50 -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 96857 invoked by uid 99); 4 Jun 2014 19:38:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jun 2014 19:38:50 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of craig.skinfill@gmail.com designates 209.85.216.50 as permitted sender) Received: from [209.85.216.50] (HELO mail-qa0-f50.google.com) (209.85.216.50) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jun 2014 19:38:46 +0000 Received: by mail-qa0-f50.google.com with SMTP id j15so7626176qaq.23 for ; Wed, 04 Jun 2014 12:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=hj5R5re6eqKqPjntijBdx08N+158mA6r2u6Mab7kYJw=; b=Pkq0N/7BMGGCDmMUJvXooxGNND+Kch1oLWbFbFCZxY5P4mvxKNFBqIiGAKrWy9+3qT gOdMOos9NKwleZVJjOUT5z9S2mqq2OeuWkPnoGI2gZd5fJgAZeyShF9KWXD89pCexDc/ 3DOmDuQYx6LaiRS6Ql7VoGVbZIjzY9FWnf8TUw9WhajuPdHtVWezWMrn9uVYgqSQsbab 6v/aL2VdmXbXrsVnTQLqbHVddlBoLhgAkWs/5YqqBIrqDLG+Mo3COdEx7Cm01+IBwIh3 kTLz2ur2ySeEzjvyK275Xr1ywmF1635f4DUGjnPdzYetAFB3O3HXRi3csB+fS+GxCCYN wS5A== X-Received: by 10.224.161.138 with SMTP id r10mr78717627qax.2.1401910702628; Wed, 04 Jun 2014 12:38:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.50.137 with HTTP; Wed, 4 Jun 2014 12:38:02 -0700 (PDT) From: Craig Skinfill Date: Wed, 4 Jun 2014 15:38:02 -0400 Message-ID: Subject: Caching and async http client To: dev@hc.apache.org Content-Type: multipart/alternative; boundary=089e014953ec6fe89404fb07c56c X-Virus-Checked: Checked by ClamAV on apache.org --089e014953ec6fe89404fb07c56c Content-Type: text/plain; charset=UTF-8 HTTP Components team - I have some approved time this summer to work on an open source project, and I'd like to work on improving the caching support in the async http client. Currently, the requests to the origin are non-blocking, but the requests to the cache are blocking. The async caching support appears to be implemented as a decorator of the http client, while in the blocking client case its implemented by decorating the internal ClientExecChain instance. My initial idea was to follow the same pattern in the async client as with the blocking client, and use an internal ExecutorService to submit requests to the cache, and then block (with a timeout) the returned Future with the cache lookup result. This is of course still blocking, but at least provides a potentially configurable timeout when checking the cache. How should I approach this? I see a comment in https://issues.apache.org/jira/browse/HTTPASYNC-76 regarding the likely need to make changes to the existing blocking http client caching implementation along with changes to the core async http client protocol pipeline processing. Are there any existing ideas, plans, etc., for making the caching non-blocking for the async client? Or what changes would be needed in the blocking client's caching implementation? Is there enough need to make this improvement? Thanks. --089e014953ec6fe89404fb07c56c--