[DGD] Object house-keeping and persistance

Felix A. Croes felix at dworkin.nl
Fri Aug 20 02:55:56 CEST 2004


birgit.schulte at philips.com wrote:

> I am wondering about ways to make sure the number of unused / discarded
> objects in
> a persistant mud doesn't go through the roof.

It may not be what you want, but this is one of the things I designed
the resource management subsystem for, and I'll explain my reasons.

Object cleanup as it exists in the original LPmud is very limited.  It
only works for rooms, and only under specific circumstances.  Rooms
are precisely the objects that in DGD you do not want to destruct, and
that you do not have to destruct.  So the whole idea of object cleanup
as it exists in LPmud doesn't apply to DGD.

How can the mudlib of a persistent mud determine that an object is
unused, and can be destructed?  The answer is that in the general case,
it can't, because it is impossible to second-guess the LPC programmer.
What you could do is let objects voluntarily register for a "cleanup
list", destruct them when certain conditions specific to that cleanup
list have been met, and recreate them if you should need them again.
Objects that don't have to be recreated at all will then eventually
be cleaned up, and gone forever.  But you will also be doing a lot
of destructing and recreating, because objects that <are> still in
use will also be in that list.  It would be even better if those
objects were never destructed at all.  And of course it is possible
that some rogue objects never register for any cleanup list in the
first place.

Therefore I decided to leave the selection of objects to destruct
to the programmer.  To inspire the programmer to actually do that,
I made an object quota.  Let's say that everyone starts out with
space for 100 objects.  How you use that is entirely your business.
>From the mud admin's point of view, all of these objects will be
"in use".  But the programmer who runs out of free objects will be
motivated to recycle some old ones (provided of course that the
tools to do that are available), or else will have to answer the
question, "why do you need more than 100 objects?"

Regards,
Dworkin
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list