[DGD] Re: Recompiling object trees

Felix A. Croes felix at dworkin.nl
Sun Feb 22 00:45:01 CET 1998


"Jason Cone" <jcone at cs.tamu.edu> wrote:
>[...]
> Mr. Harte implied that dynamically updating the auto object was possible,
> yet the above explanation by Mr. Croes would counter that.

No, I was attempting to elucidate, not opposing.


> I'm truely not
> trying to spark a debate here,

I am :)


> but I think this is important enough to
> undestand and I think there are more people than just I who don't fully
> grasp the implications of this issue.  Here are my assumptions and
> conclusions based on the previous few posts:
>
> * To update an object that is inherited, you must destruct every inheriting
> object.

No.  To upgrade an object A that is inherited, you must destruct A and
all those objects inheriting A <which are themselves inherited>.

Like Erwin Harte, I use the word "upgrade" for this.  "Update" has
rather different connotations in standard LPmuds.


> * You cannot update/recompile the auto object via compile_object() because
> it is inherited by every object.  You would theoretically have to destruct
> every loaded object for this to happen - this is not possible.

It is of course possible to destruct every loaded object, but that would
not help you.  Recall that Erwin Harte divided objects in an inheritance
tree in two classes: the core of objects that are inherited, and the
"leaf" objects that inherit but are not inherited themselves.  The
leaf objects can be recompiled without destructing them first -- since
they are not inherited by anything.


> * The only way to "update" the auto object is to perform a state dump and
> restart DGD.  I'm assuming here that, even if you perform a state dump and
> reboot from it, the newest version of the object will be used.

No and no.  Upgrading the auto object can be done by:
 - destructing the auto object and every other inherited object (because
   they all inherit the auto object)
 - recompiling the remaining objects without destructing them first
   (because they are leaf objects which are not inherited, and they all
   inherit the auto object)

Furthermore, if you reboot from state dump, the auto object will be used
that was saved in the state dump.

Basically, the process of destructing inherited objects and recompiling
leaf objects performs an upgrade on the entire inheritance tree.  Note
that except for the ability to recompile leaf objects without destructing
them, none of this is extraordinary or impossible with other drivers.
So recompiling leaf objects is the basic building block you need for
upgrading entire inheritance trees.

Regards,
Dworkin



More information about the DGD mailing list