l4-hurd
[Top][All Lists]
Advanced

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

Re: IDL4 and state description


From: Andreas Haeberlen
Subject: Re: IDL4 and state description
Date: Thu, 04 Sep 2003 18:01:47 -0500

Hello Ludovic,

>> Value types are a fairly high-level feature, and to implement them,
>> you need a whole lot of infrastructure
> What makes it more difficult than marshalling parameters?

For an 'ordinary' data type such as a struct or a sequence, you
only need to transfer the state that is defined in the interface.
For a value type, however, you must transfer the _entire_ state,
including e.g. all the private variables the particular
implementation uses, or all the objects it has a reference to,
which can get quite complicated (recursion, cycles, ...).
Also, you must make sure that the receiver can actually use this
information, i.e. it has a suitable implementation for the object.
If you do not have such an implementation, you are expected to load
one dynamically, or to truncate it to a base type.

This is easy for programming languages like Java, where you have
serialization and a dynamic class loader. It is hard to do in C++,
and it is probably even harder to do it efficiently.

> Another solution to allow an object state to be exported would be
> to add a `get_state ()' method added to the interface definition
> that would return a CORBA struct representing the object state.

What you describe sounds more like custom marshalling, and that
is an entirely different story.

- Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]