Archived

This forum has been archived. Please start a new discussion on GitHub.

Large chunks of data

Hi,

I am working on a video service which will transfer image data (>1 MegaPixel) as a return type. I plan to define this as:

interface IMAQ
...

sequence<byte> acquire();

....


Is this the proper way to do this?

Thanks,
Mark

Comments

  • think so as byte is fastest you can get as is uninterpretted.
  • Large chunks of data

    I looked at the "similar threads", and ZeroC indicates that sending data in such big chunks is not efficient.

    So, now I'm thinking of defining:

    interface IMAQTransferHandler {
    imageStart(ImageID);
    imageEnd(ImageID);
    imageData(ImageID, ByteSeq);
    };

    And my image acquisition interface becomes:

    interface IMAQ {
    ...
    ImageID acquire(IMAQTransferHandler*);
    ...
    };

    Opinions are welcome!

    Mark
  • If you have sufficient memory to buffer the entire image, you can send it in a single RPC. (You'll have to adjust the value of the Ice.MessageSizeMax property to allow requests larger than a megabyte.) More likely though, you'll have to split the data into chunks and retrieve the chunks. I suggest you have a look at the source for IcePatch2. It does a similar job and should provide some ideas.

    Cheers,

    Michi.
  • Makes sense - let the client do the work. Nice and simple.
  • Ice.MessageSizeMax

    I changed my Ice.MessageSizeMax to something really big, and now I can transfer really big images as parameters. Is there any disadvantage in doing this?
  • topgun300 wrote:
    I changed my Ice.MessageSizeMax to something really big, and now I can transfer really big images as parameters. Is there any disadvantage in doing this?

    Please see this post regarding our new support policy for these forums:

    http://www.zeroc.com/vbulletin/showthread.php?t=1697