Streaming support for upload/download content from/to object store
Dear colleagues,
One of the known issues mentioned in this github page is that 'there are connection issues with using input streams instead of byte array'. Since the issue still remains unsolved, is it recommended to only transact with the objectstore as byte array (and not use streaming at all)? Or is it ok to use input/output streams? For files larger in size, I guess, streaming would result in a sizable performance gain. Can you please advice us on this?
To be more specific, BlobBuilder has an overloaded payload method - taking either InputStream or byte[] as an argument. Can we use the InputStream one without any side effects?
For downloading content, since the example provided uses InputStream, I guess there are no problems with it, right?
Regards, Raghu
Hi,
You may find some examples and code snippets in JClouds here pertaining to the creation of a payload. Interestingly most of the examples use byte as the source to create payloads instead of streams. Maybe using streams is a constraint in jclouds api since the issue is still open till date. And you're right, streaming would adversely impact the performance. We recommend to try with small files for both uploading and downloading operations as we observed issues with large files.
Thanks