Hi. I am seeking opinions on the most efficient way to transfer binary data from a Java client to an OE AppServer.
Unfortunately you cannot simply have a 'BLOB' data type as an input parameter when using the open client proxies.
Our current methodology is to chunk the file into raw chunks sending each chunk as a field in a temp-table record (SQL result set on Java) and reassemble on the server. This works ok but I am looking for something better.
Is there a way to stream the contents of binary object to the AppServer?
Thanks.
Blob is a database type. It's closest ABL runtime type is MEMPTR which can be used with openclient. Load the bytes into a memptr variable which can be transferred. You don't need to chunk them.
OpenClient data type is com.progress.open4gl.Memptr which accepts a byte array to its constructor.
Thanks Matt.
I was hoping to find a way to avoid have to bring the whole binary file into memory. Without writing my own socket server, is it possible to stream it directly from disk to the appserver?
So if i understand correctly your looking more for a streaming solution?
Yes sir: I want to stream the contents of a binary file (any size) from a java client to the AppServer.
John Green has done something very similar with the new proparse api. Have a look at his code.