Re: Interface Versioning



On 11 Jul 2001 18:22:40 -0400, Michael Meeks wrote:
> 
> Hi Dave,
> 
> On 11 Jul 2001, Dave Camp wrote:
> > On 11 Jul 2001 14:28:23 -0400, Michael Meeks wrote:
> > >     'give me libgtkhtml.so.173'
> > >
> > >     The way oaf activation happens is often more like:
> > > 
> > >     'give me something implementing the 'open' interface'
> > >
> > >     If you go and change the signature of the 'open' method to take a 
> > > 'froznik *' pointer instead of int length, and install two versions
> > > implementing this interface - then the system acts erraticaly,
> ambiguously
> > > and it is not possible to fix: the contract has been broken between
> > > components.
> >
> > Correct me if I'm wrong, but as I understand it you can avoid this
> > ambiguity.
> 
>         Yes, perhaps _you_ can. You can activate on OAFIID or something
> else nice and unique - and demand a specific component. The issue is that
> you then have multiple components on the system that support different
> interfaces - and yet have the same capabilities. Should anyone do a
> capability based activation they get a whacked out component with an
> unpredictable programmatic interface.
> 
> > You don't activate on interface name, you activate on repo id (you ask
> > IDL:Bonobo/Foo:1.0, not Bonobo/Foo).  The repo id includes an
> > interface version.  The default is 1.0, but it can be changed in the
> > idl file (I believe it uses #pragma version to change it).
>         
>         You can activate on anything you like - the fact that the stringv
> 'repo_ids' in the .oaf file are interface names is helpful. Interface 
> versioning however is not at all helpful to my mind.


You seem to have misunderstood: IDL:Open/1.0 is the _interface_ version,
not the component version.  If the container asks for interface Open
version 1.0 (or 1.1 or whatever) oaf should be able to pick from a list
of components that implement _that version_.

>         
>         Seriously, you walk into a horrible, horrendous minefield of a
> place - where the same code will produce different binaries when compiled
> on different systems with different installed gtkhtmls, where you can't
> see what interface is being used by reading the source, where multiple
> interfaces have the same name as far as anyone can see in the code. Where
> scripts suddenly magicaly stop working when the interfaces change etc.
> etc.

The container needs to ask for the version it wants (defaulting to
version 1.0 of course).

>  
>         So, to try and get all these things to be compatible, in fact you
> create a situation where in most cases the new interface will link fine
> with old code, [ since all the symbol names will be fine ], but will
> produce horrendous runtime errors - since the signatures are different.
> Please version inside the interface name, and not the useless CORBA
> version.

Thats not true! If the signature changes then the application code has
to change too, or it wont link.

> 
> > So in your example, you don't really ask 'give me something
> > implementing the 'open' interface', you actually ask 'give me
> > something implementing IDL:open:1.0' or 'give me something
> > implementing IDL:open:1.1'.
>           
>         Yes - but ultimately why is it that people want to implement
> open:1.1 and not open 1.0 ? if you provide backwards compatibility there
> is no problem. If you want to implement a new component, then abandon your
> old interfaces and write new ones - with different names, or versions
> mangled into them. But perhaps by ICanNowWriteGoodInterfaces17 people will
> be paying more care to the interfaces they publish.
> 
>         Clearly when we go for a large scale platform transition eg. Gnome
> 1.0 -> Gnome 2.0 we can fix, clean and rename interfaces to be nice.

The point is that we dont have to have flag days.

>    
>         In conclusion - if you feel you really, have to version your
> interfaces - please do it in the human readable, part of the interface
> name - and not in the dodgy, unsupported, CORBA 'version'.   

?!

Which is more unreadable? "Open/1.0" vs "Open/1.1" or "Open" vs
"OpenEmbracedAndExtended" ?

>    
>         Regards,
> 
>                 Michael.

- Dick







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