Is it possible to make a remote call to a remote Java object that uses BlazeDS so that the data is gotten as a stream (InputStream)? For example when uploading a file, it would require less memory.
The BlazeDS examples about file upload that I've seen read the data from file to client memory first with FileReference#load() and after that pass it to the server as ByteArray. By doing so, both client and server need to load the whole file data into memory before it can be passed/processed.
Here's a blog post that "MIGHT" have an answer for your or at least give you an idea how you could accomplish this.
Hope that helps.
Thanks for the tip Joe.
It's not quite what I was looking for, but it gave me some ideas.
The blog post describes how to create your own server to handle the file stream. With BlazeDS & Java EE app server there's no need to implement the low level stuff.
One option would be to read the data on Flex side in chunks and make a request to send each chunk at a time, but I don't know whether this helps at all. Might just slow down the network.
Another option is to write a custom adapter for BlazeDS endpoint, but I don't know enough details on this to say is it possible or not.
Third option is to use regular servlet code and Apache Commons FileUpload module.
Still interested hearing opinions from people working with BlazeDS.