Subject: Re: Multiple Databases

From: "Bob Monsen" <[email-masked]>
Date: Fri, 24 Sep 1993 17:23:13 -0700

Reply from the
desk of
                                                             Bob Monsen
 Subject:   RE>Multiple Databases
From: Judy Anderson
> I don't know enough about how the server communicates with the
> database to know whether your scheme would be workable: what would you
> do about object numbers?  

The object number problem is a real one... One way to deal with it is to make
sure that different packages have big holes in the object number space
allocated to them. That would enable objects in packages to always have the
same number, even if the core changed. You could use the high 16 bits in a word
as the 'package number', which was allocated at package load time, and stored
in other databases by package name, or something like that...

All of this presupposes that the 'package' databases don't change around once
they are created; they can get added to, but moving object IDs around would
obviously screw things up.

> How would you save your objects out if you wanted to make a local 
> change to the core database?  

You wouldn't want to make local changes to the core, because you would be able
to patch things on top of the core with the local package. The advantage of
this is that you wouldn't lose those changes when you updated your core.

> How would you specify which database a newly created object went in?

All new objects would go into the local database by default. If you wanted to
create a package, you would have to collect up all the objects, and move them
manually into the new package, using the wizardly verb I alluded to in the
prior message. I don't know how this would interact with object numbers.
Another way you could do it would be a verb that put you into 'package creation
mode', making all new creates be in the 'current' package. Or, you could have a
new create verb that would set the package as well as do a create. Dump the
package, and you have a db file that can then be loaded by another moo...

> Could you move objects from database to database?

Yes, that would be a nice feature of doing this. You could create packages that
would contain sets of objects which could be loaded on any moo that supported
the prerequisite packages.

This started out as a proposal to separate the core and local databases, so
that I could update to new cores without dumping all my objects and
reinstalling them. However, packages have lots of advantages, such as
portability, factoring of the core (the Mr Spell syndrome), and the ability to
produce releases of sets of MOO objects. (Version 1.3 of Mr Spell...). Another
advantage is that checkpointing would be much faster, owing to not having to
dump the core every time. (Unless you have fork(), it blocks your users for two
minutes each time)

The first part is really simple. The second part may take a little more work
than I first thought, but I don't see any insurmountable problems at this
point.

Thanks,
  Bob Monsen

--------------------------------------
Date: 9/24/93 15:05
To: Bob Monsen
From: Judy Anderson
Ah, the "scheme for separating the core objects from the local objects
for creating core databases" is quite destructive: it recycle()s all
non-core objects, and then uses renumber() on all the remaining
objects to compact things, finally ending with a reset_max_object().
This is done to a separate copy of the LambdaMOO database, producing a
much smaller core database.  Quite a bit of massaging of the objects
is done also, to prevent recycled object references, messages on
mailing lists, etc. from escaping into the resulting core.  Usually we
screw up and someone has to tell us what they found in the core so we
can fix the code for the future.

I don't know enough about how the server communicates with the
database to know whether your scheme would be workable: what would you
do about object numbers?  How would you save your objects out if you
wanted to make a local change to the core database?  How would you
specify which database a newly created object went in?  Could you move
objects from database to database?

------------------ RFC822 Header Follows ------------------
Received: by quickmail.apple.com with SMTP;24 Sep 1993 15:05:10 -0800
Received: from colossus.apple.com by jumbo.apple.com with SMTP
(5.64/22-Jun-1993-eef)
	id AA00395; Fri, 24 Sep 93 14:53:16 PDT
	for [email-masked]
Received: from Xenon.Stanford.EDU by colossus.apple.com with SMTP
(5.65/22-Jun-1993-eef)
	id AA08423; Fri, 24 Sep 93 14:53:06 -0700
	for [email-masked]
Received:  by Xenon.Stanford.EDU (5.61+IDA/25-CS-eef) id AA21996; Fri, 24 Sep
93 14:52:52 -0700
Date: Fri, 24 Sep 93 14:52:52 -0700
From: Judy Anderson <[email-masked]>
Message-Id: <[email-masked]>
To: [email-masked]
Cc: [email-masked]
In-Reply-To: "Bob Monsen"'s message of Fri, 24 Sep 1993 14:46:10 PDT
<[email-masked]>
Subject: Multiple Databases