Re: a question about CORBA



Hi Frank,

On Tue, 23 Oct 2001, Frank Rehberger wrote:
> interface FileConsumer
> {
>     eatFile(String filecontent);
> };

        Hey :-) good advice, for a text file. The best way of passing a
large chunk of binary data is a sequence<octet>, also for anything large a
sequence<char> is better than a string, since it encodes the length -
saving several strlens.

> be carefull if the file is very large you have got to load all into
> memory before transfer can start. I would use CORBA (ORBit) only for
> middle size files.

        Yes - cunningly ORBit1 alloca's a huge amount of heap space, then
memcpy's the data into it, and then passes it to the giop_layer - with a
1Mb sequence <octet> this can suck badly too :-)

        ORBit2 at least dynamicaly allocates the buffers instead of
pulling them off the stack, and in time to come might well just try
stuffing large, flat sequences into the iovec to be written straight.
Problem is determining what is flat quickly and genericaly in a nice way;
we're working on it :-)

        Regards,

                Michael.

-- 
 mmeeks@gnu.org  <><, Pseudo Engineer, itinerant idiot




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]