[MUD-Dev] World Persistence, flat files v/s DB v/s ??

J C Lawrence claw at under.engr.sgi.com
Mon Mar 23 12:43:27 CET 1998


On Sun, 22 Mar 1998 12:16:14 PST8PDT 
Ben Greear<greear at cyberhighway.net> wrote:
> On Sun, 22 Mar 1998, Matt Chatterley wrote:
>> On Sat, 21 Mar 1998, Ben Greear wrote:

> There will be much data.  I'll need to do updates very often, and
> considering the dynamic nature of the game, I will almost have to do
> a complete write, all at once, in order to make sure the state is
> sane.  (Consider a ship moving between two quadrants, write one
> quadrant, move ship, write the other...now we are all hosed up!)

Nahh..  Essentially you need a transactional process with commits only
at the ends of transations.  This stuff is old hat in the DB world.
Do some research on "two phase commits", "ACID", and other DB
principles.  I'd suggest reading the docs for YOODA and tdbm for early
starters as they're both simple and cover the ground reasonably well.
The Arjuna pages aren't bad either.

> The other idea would be to write on every change, and just write
> what changed.  If this was done by another thread, and cached
> decently..it might work...  The problem then becomes one of mapping
> data into files, which I absolutely fear :P

Okay, repeat after me: RESEARCH SIMPLE TRANSACTIONAL DATABASES!  LOOK
AT COOLMUD!  LOOK AT UBERMUD!

These last two are nice simple examples of databases as applied to MUD 
servers.  Look at YOODA, and tdbm for nice simple and well explained
(IIRC) examples of DB's with transaction support.

> I'd wrather deal with binary than compressed stuff.  The objects
> will have to be able to migrate between servers (each server will
> encompass one solar system, and hopefully there will be many solar
> systems linked through sockets, either on one machine, a cluster of
> work stations, or indeed, across the net..).  The point of this last
> sentence is that I will have to make it write binary to a stream
> anyway...

Next look at persistant stores like the Texas Persistant Store and
Arjuna.  You can find these and all the other's I've referenced on the 
FreeDB list at http://solar.flare.net/FreeDB/.  If you have problems
finding the various MUD servers I've referenced, please contact me
off list.

--
J C Lawrence                               Internet: claw at null.net
(Contractor)                               Internet: coder at ibm.net
---------(*)                     Internet: claw at under.engr.sgi.com
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...



More information about the mud-dev-archive mailing list