hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HTTPASYNC-76) CachingHttpAsyncClient does not follow same pattern as Caching HttpClient
Date Tue, 06 May 2014 12:28:15 GMT

     [ https://issues.apache.org/jira/browse/HTTPASYNC-76?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oleg Kalnichevski updated HTTPASYNC-76:
---------------------------------------

    Fix Version/s: Future

Matt
HttpAsyncClient caching module in is a wreck. I am perfectly aware of it. The problem is there
are multiple reasons that make a better caching implementation very challenging and highly
expensive in terms of development efforts. It almost certain to require a complete re-engineering
of the caching module in HttpClient, which in its present form is inherently blocking, and
a major overhaul of the HttpAsyncClient protocol processing pipeline. It is also very likely
to require upgrade to NIO2 and Java 7. 

The worst part of it is that I simply do not see myself being able to work on this task any
time soon (if ever, truth to be told). 

So, the existing cache implementation is meant to be 'better than nothing' and as such it
looks to be quite adequate.

Oleg

> CachingHttpAsyncClient does not follow same pattern as Caching HttpClient 
> --------------------------------------------------------------------------
>
>                 Key: HTTPASYNC-76
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-76
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: Improvement
>    Affects Versions: 4.0.1
>            Reporter: Matt Inger
>             Fix For: Future
>
>
> I would have expected the Caching version of the HttpAsyncClient library to following
same pattern as the non async version.  In the non-async version, we have a CachingHttpClientBuilder
class which extends the HttpClientBuilder, and they both end up returning the same client
implementation:  CloseableHttpClient.  
> I would have expected the same from the async version.  Instead it uses CachingHttpAsyncClient
as a decorator approach.
> This is unfortunate, because i really want to be able to not care about the implementation
and do this:
>     CloseableHttpAysncClient client = clientFactory.create("test");
> But i cannot do this, due to the design.  I also considered this:
>     HttpAysncClient client = clientFactory.create("test");
> But this does not guarantee that it implements Closeable, and in fact, CachingHttpAsyncClient
does not implement that interface.
> I'd like to see it more in line with the synchronous version.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message