Bug 955363 - Uploading of file content using remote API/CLI requires many times more heap then file size

Thomas Segismont tsegismo at redhat.com
Tue Sep 10 08:26:52 UTC 2013


Hi everyone,

I've been working "Bug 955363 - Uploading of file content using remote 
API/CLI requires many times more heap then file size" [1].

The CLI uses JBoss Remoting on HTTP(S) to communicate with the server 
and JBoss Remoting is based on JDK's HttpUrlConnection. 
HttpUrlConnection makes a copy of the payload before sending it. So when 
the CLI makes a call to a remote method with an array of bytes as 
parameter, it holds two copies of the content.

There is a streaming feature in JBoss Remoting but it needs an extra 
port to be opened. That means extra complexity, and we would loose the 
ability to run the CLI in front of restrictive firewalls.

So I chose to add new methods to the ContentManager in order to give it 
the ability to receive content in fragments. I've updated 
ResourceClientProxy accordingly.

The fix is in a bug branch [2] and before merging it into master I'd be 
glad to hear your comments, if any.

Thanks and regards,
Thomas


[1] https://bugzilla.redhat.com/show_bug.cgi?id=955363
[2] 
https://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?h=bug/955363&id=e27d5a1886b028ddff832da2282178b8dcb2eed4


More information about the rhq-devel mailing list