You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2017/12/20 11:04:00 UTC
[jira] [Resolved] (HTTPCLIENT-1868) Make memcached storage backend
operation non-blocking
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski resolved HTTPCLIENT-1868.
-------------------------------------------
Resolution: Fixed
Fix Version/s: 5.0 Beta1
@[~jimhorng] I just added a fully asynchronous HTTP cache storage interface and its implementation based on memcached. Please see the commit above. I am in the process of making the async cache exec interceptor fully asynchronous. Feel free to watch HTTPCLIENT-1824 to monitor the progress. Once HTTPCLIENT-1824 is resolved HttpAsyncClient should have a fully asynchronous request execution pipeline when configured to use memcached storage backend.
Code review and help with testing would be very, very much appreciated.
Oleg
> Make memcached storage backend operation non-blocking
> -----------------------------------------------------
>
> Key: HTTPCLIENT-1868
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1868
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Components: HttpClient (async)
> Affects Versions: 5.0 Alpha2
> Reporter: Jim Horng
> Labels: volunteers-wanted
> Fix For: 5.0 Beta1
>
>
> < Context >
> Since `HttpAysncClient` is non-blocking, but it's operation to memcached at `MemcachedHttpCacheStorage` layer still using blocking I/O manner. Even `spymemcached` client which has non-blocking I/O in nature, but `MemcachedHttpCacheStorage` is using `spymemcached` blocking API.
> < Benefit >
> If all the way in flow of `HttpAsyncClient` is non-blocking, then it can truely do high concurrency with just a few threads, otherwise, performance will be largely impact by blocking calls since there's only a few threads for serving http requests.
> < Code Flow for Blocking manner >
> # `org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage#getEntry` -> `final MemcachedCacheEntry mce = reconstituteEntry(client.get(key));`
> # net.spy.memcached.MemcachedClient#get(java.lang.String)
> Should use `net.spy.memcached.MemcachedClient#asyncGet(java.lang.String)`, but then whole API calling structure require big changes.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org