hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Using async HTTP client to upload 1GB entity
Date Tue, 09 Aug 2011 19:28:48 GMT
On Tue, 2011-08-09 at 13:26 -0500, Jon Brisbin wrote:
> I can't figure out how I need to adapt the various Producer/Consumer components to do
a large file upload . I do not have the file on the local filesystem and I obviously don't
want to buffer the entire file in memory if I want to do more than a single upload at a time.
> I'm looking into creating an async Producer to do this, but I'm wondering how it works
underneath. If I call write() on the ContentEncoder with a ByteBuffer, does it flush the bytes
down the channel so that they aren't in memory any longer? I don't want to accumulate this
stuff until the end of the upload then send everything at once. I want to stream it to the
server as I get it. 
> Thanks! 
> Jon Brisbin 
> http//jbrisbin.com 


Have you looked at the ZeroCopyPost / ZeroCopyPut producers? They are
precisely meant for efficient (zero copy) file transfers.


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

View raw message