[DGD]serialisation/deserialisation of mixed data.
Felix A. Croes
felix at dworkin.nl
Wed Apr 28 18:00:25 CEST 1999
balduin at uni-paderborn.de wrote:
>[...]
> > 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.
<munch, munch>
> 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.
I take it that you want to serialize as a byte stream for
communication between two muds? If it's anything else, you are
trying to solve a problem already solved in DGD itself.
What are these objects doing in a mysql database? If they really
have to be, I'd implement this as a kfun rather than in LPC, so
you can use DGD's mechanisms for delayed loading of both objects
and arrays/mappings.
> 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.)
Perhaps you mean "nested" rather than "recursive"?
> 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)
This suggests that you're not transferring data between muds, but
keeping everything within a single mud.
Are you sure you want to store LPC datatypes wihin a mysql database,
redoing what's already solved in DGD? :)
If you are really, really sure, I suggest handling this at the kfun
level rather than the LPC level, so you can make use of DGD's well-
developed persistence and delayed loading code. Further suggestions
will have to wait until I know more about what exactly you have in
mind.
Regards,
Dworkin
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list