Re: Interface Versioning



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.
        
        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.
 
        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.

> 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.
   
        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'.   
   
        Regards,

                Michael.

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





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