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] [Resolved] (HTTPASYNC-17) org.apache.http.impl.client.cache.CachingHttpClient should have an nio counterpart: CachingHttpAsyncClient
Date Wed, 01 Aug 2012 13:00:22 GMT

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

Oleg Kalnichevski resolved HTTPASYNC-17.

    Resolution: Fixed


It turned out that adding caching support to streaming HTTP exchanges is a major problem.
Cache operations are inherently synchronous and it is almost impossible to make the content
stream backed by a caching entry behave consistently with that coming directly from a socket
channel. It either takes a separate thread or the content consumer must be prepared to consume
incoming message content in one go completely defeating the whole idea of streaming HTTP exchanges.
For the time being I just made the streaming execute method completely bypass the caching
layer. In the future we could use NIO2 for file based caches but this would require upgrade
to Java 7. 

Please review.


There is now a lot of duplicated code in HttpClient and HttpAsyncClient caching modules. It
would be great to have some of it extracted to re-usable classes and shared by both modules.

> org.apache.http.impl.client.cache.CachingHttpClient should have an nio counterpart: CachingHttpAsyncClient

> -----------------------------------------------------------------------------------------------------------
>                 Key: HTTPASYNC-17
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-17
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: New Feature
>         Environment: NA
>            Reporter: Clinton Nielsen
>            Priority: Minor
>             Fix For: 4.0-beta2
>         Attachments: AsynchronousAsyncValidationRequest.java, AsynchronousAsyncValidator.java,
> org.apache.http.impl.client.cache.CachingHttpClient should have an nio counterpart: CachingHttpAsyncClient.
> Since I needed the functionality for my own project, I went ahead and made the appropriate
changes to CachingHttpClient to allow it to decorate an HttpAsyncClient.
> I'm attaching the files here, for consideration for a future release.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


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

View raw message