[omniORB] Bug Or User Error?

W. Eliot Kimber eliot@isogen.com
Tue, 12 Jun 2001 09:23:09 -0500


Duncan Grisby wrote:
> 
> On Monday 11 June, "W. Eliot Kimber" wrote:
> 
> > Is this IDL really in error (I assume it is)? If so, should omniidl
> > catch this case?
> 
> That IDL is extremely ugly, but valid. The bug is in the Python stub
> generating back-end. It's fixed in CVS.
> 
> Thanks for the bug report,

Happy to help.

It is unfortunate that IDL does not allow forward declaration of structs
or unions--it would make the IDL in this case much less ugly.

My task is to communicate the data from a complex graph (potentially
100s of thousands or millions of nodes) to a client in an efficient way.
The most efficient way would be for the graph manager to provide a
pre-made binary serialization, but we don't have that, so the easiest
solution appears to be to use structs and let the ORB optimize the
serialization/deserialization. I will also provide interators for
letting clients tune their data requests.

In this case, the graph structures don't lend themselves to simple
direct recursion--there are several layers of distinct object types
between the root type (Node) and its recursive use, thus the need to use
this crazy union.

On the other hand, while the union is ugly, it will be easy to provide
client-side helper code to expose the delivered data through an
easy-to-use API (i.e., emulating the API of the server-side graph
implementation). Thus client use of the data shouldn't be ugly. 

Cheers,

E.
-- 
. . . . . . . . . . . . . . . . . . . . . . . .

W. Eliot Kimber | Lead Brain

1016 La Posada Dr. | Suite 240 | Austin TX  78752
    T 512.656.4139 |  F 512.419.1860 | eliot@isogen.com

w w w . d a t a c h a n n e l . c o m