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

Vadim Tkachenko vt at freehold.crocodile.org
Sun Mar 22 12:33:44 CET 1998


Joel Dillon wrote:
> 
> On Sat, 21 Mar 1998, Ben Greear wrote:
> 
> >
> > I'm contemplating a space based game, where once started, it will
> > never again resemble it's starting state (unless the starting world
> > image is saved of course.)  It will be written in Java.
> >
>   I've been thinking along these lines (a non-resetable mud) except
> I'm using C++.
> 
> > The game will need to update it's persistant storage very often
> > to make this feasible.
> 
>   How often is very often? Wouldn't a backup and save to disk every
> half-hour or so be ok?

Why don't you think about some abstract number instead of half-hour?
What about 'as soon as needed', and make it incremental, so only changed
data is being queued for update, and update is being performed in a
background low-priority thread?

> > In my current game, I use ascii based flat files.  I don't think
> > this will work so well for the space game.
> 
>   Well, it depends on what sort of machine spec you have, but I'd
> have thought ASCII flat files wouldn't be a big problem as long as
> you load all the data into memory when the server starts up
> 
> > Also, as a java server, I don't think I can do a select on incomming
> > data.  I think a thread for every player is a bit much...any suggestions
> > here?
> 
>   What's wrong with that? Threads aren't too expensive. Unless you're
> anticipating literally thousands of simultaneous players you should be
> fine.

In this case, all you need to have is hub servers - the concept
description follows.

- You strictly divide the persistence engine from the logic;
- You build the two-tiered system with the logic as a client and the
persistence engine as a server;
- You build them in such a way that doesn't require them both to be
within the same binary (address space, whatever), or build the adaptor
which will be within and will connect to the persistence engine outside;
- Your problem is fixed, because as soon as you finish that, you don't
have a limitation to run those thousands of threads on the same box -
you can spread them through several servers.

What do you think?

>         Jo

--
Still alive and smile stays on,
Vadim Tkachenko <vt at freehold.crocodile.org>
--
UNIX _is_ user friendly, he's just very picky about who his friends are



More information about the mud-dev-archive mailing list