Transferring Large Binary Data

Posted by Jeff Ledbetter on 03-Feb-2009 10:17

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.

All Replies

Posted by Matt Baker on 03-Feb-2009 10:32

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.

Posted by Jeff Ledbetter on 03-Feb-2009 10:58

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?

Posted by Matt Baker on 03-Feb-2009 13:00

So if i understand correctly your looking more for a streaming solution?

Posted by Jeff Ledbetter on 03-Feb-2009 13:03

Yes sir: I want to stream the contents of a binary file (any size) from a java client to the AppServer.

Posted by jmls on 03-Feb-2009 18:41

John Green has done something very similar with the new proparse api. Have a look at his code.

This thread is closed