[MUD-Dev] Database vs. Disk
J C Lawrence
claw at kanga.nu
Sat May 24 09:28:45 CEST 2003
On Sat, 24 May 2003 06:03:44 -0400 (EDT)
Zach Collins <(Siege)" <zcollins at seidata.com>> wrote:
> On Fri, 23 May 2003, J C Lawrence wrote:
>> On Thu, 22 May 2003 16:06:37 -0400 (EDT) Zach Collins <(Siege)"
>> <zcollins at seidata.com>> wrote:
>> Given: ObjectA contains a pointer to ObjectB, a reference to ObjectC,
>> and an attribute of ObjectD, and inherits from ObjectX and ObjectY,
>> each of which potentially have their own variously complex multiple
>> inheritance trees.
>> When I serialise ObjectA, how much do I have to serialise? For that
>> choice, how do I guarantee logical consistency across the DB for
>> crash-recovery or rollbacks or even simple updates to objects which
>> are commonly inherited from or otherwise referenced?
> My (inexperienced) answer: Design a simpler data structure.
The problem is that its not really a data structure problem. Its a
policy question (which then makes requirements of data structures). The
problems here are what to represent, when, and what the policies are in
regard to maintaining references, especially as the data is updated. It
also really don't matter so much what your object definition is, or the
range of types of references (which is really a policy decision as
well), its that you know you are going to have object references of
various forms, and once you have them, how do you manage storage in a
way that provides logical correctness.
Simple cases:
RootObject, which has several thousands of other objects descending
from it most of which are several generations down the tree, is
updated, changing the contents of a method and adding a new method
and attribute. What happens?
MagicObject which has the curious property of being able to be in
multiple locations and player inventories at the same time is
deleted from the system. What happens?
Other cases are fairly easy to extrapolate from the Given: above.
--
J C Lawrence
---------(*) Satan, oscillate my metallic sonatas.
claw at kanga.nu He lived as a devil, eh?
http://www.kanga.nu/~claw/ Evil is a name of a foeman, as I live.
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list