[omniORB] Versioning of objects
Duncan Grisby
dgrisby@uk.research.att.com
Tue, 29 Feb 2000 12:54:41 +0000
On Friday 25 February, klarson@McLeodUSA.com wrote:
> I have been unable to find much information on how to version
> objects.
[...]
A common approach is to use inheritance to represent version changes.
So, for example, you can have
interface Echo {};
interface Echo_1_0 : Echo {
string echoString(in string s);
};
interface Echo_1_1 : Echo_1_0 {
long echoLong(in long l);
};
This allows you to make additions to an interface in a way which
doesn't break existing clients. If you want to make incompatible
interface changes, you can do something like
interface Echo_2_0 : Echo {
string echoString(in string s, in long l);
};
which means that existing clients can no longer contact the object.
If you're wondering about the use of the empty Echo interface,
consider
interface EchoHolder {
attribute Echo the_Echo;
};
Objects with this interface can hold an Echo object which can be
retrieved later. The EchoHolder itself doesn't need to invoke
operations on the Echo object, so it doesn't care which version it
has, just that it is an Echo. The empty Echo interface lets you pass
around object references without caring about their details.
This approach is described in a paper which came out of Sun's Spring
project:
http://www.sun.com/research/techrep/1993/abstract-21.html
Cheers,
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --