[DGD]serialisation/deserialisation of mixed data.

balduin at uni-paderborn.de balduin at uni-paderborn.de
Wed Apr 28 12:41:42 CEST 1999


Hello again !

first attempt skipped.

> I have read the above several times now, but I'm still not even
> sure what the question is.  Could you rephrase it in somewhat
> more digestable paragraphs?

Hmm I will give it a second try and hope to be more digestable
this time.


I need to store references to persistent Objects (from a database)
in a way that serialisation as well as deserialisation is possible. 
Assume each persistant object can be retreived from a persistant and 
uniqe ID from a database.

The problems are:

I can't use 'object' for two reasons:
a) In case of recursive Datastructures deserialisation would implicitly
   mean recursive loading of possibly the whole mud. (A container in a
   container in a cointainer etc.)
b) I plan to use dgd's objects as kind of cache for the persistant
   objects. This means to free up main memory, I have to remove old objects 
   from memory, but can't afford to loose the references (They have to be 
   persistant as well)

To both problems the solution seems to be to store both an object ID and
an object pointer. The first for persistance the second for speed.
(The pointer would be left blank when deserializing to avoid the 
 recursive loading problem)
Writing an reference object to store the tuple of information is impossible 
since this would limit me to 64k references. But storing the tuple in
an array would make object references and arrays indistinguishable when
coming to serialize data of type mixed.

The question is: Is there any way left to preserve the type information
"this array is an object reference" ?

I hope this is clearer now, and sorry for the first version.

Ludger
balduin at uni-paderborn.de wrote:


List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list