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

Ross Nicoll jrn at st-andrews.ac.uk
Mon Mar 23 08:08:39 CET 1998


On Sun, 22 Mar 1998, Chris Gray wrote:

> Why do you need to reboot at all? If your system doesn't leak memory,
> and if it can save its DB to disk consistently while running, then there
> is no need.
My MUD server, while not actually set up to reboot automatically, is
generally shutdown and restarted every week or so. The thing is, to
increase storage efficiency and decrease memory fragmentation and time
taken to go through lists, the program stores
objects/players/rooms/whatever in giant arrays, which it creates at
startup with enough space for all the objects/players/whatever in the
DB, and a few spares.

The program stores the entire DB in memory at once, we use pointers
instead of IDs to refer to objects/rooms/whatever. Since allocating a new
array and moving the data into it would change all the addresses of the
data, the pointers would become invalid, which of course is a bad thing!

Now, we could solve this problem by turning all the pointers into ID
references, moving the data about, and turning them all back again,
but that will come later, and it's simpler at the moment to restart
the server occaisionally...

Oh, and the server writes out the DB every half an hour...
--
  _   __  __  __
 /_) / / (_  (__
/\  /_/  __)   /
______________/




More information about the mud-dev-archive mailing list