Re: Circlemud design issues

From: Sammy (samedi@DHC.NET)
Date: 04/22/98

On Tue, 21 Apr 1998, James Turner wrote:

> Is this really the case?  True, they can be compressed, but they will
> still take about the same amount of raw space as a binary file -- plus
> there is the inode/sector size issue, as well as inode usage.  And
> with pfiles scattered across the disk of the server, it can make
> random access to them rather slow.  There is much less overhead
> involved in a flat binary file than having hundreds or thousands of
> ascii files floating all over the place.

My ascii pfile system, in it's currently available form, already saves a
very large amount of disk space over binary.  Try out the included
plrtoascii.c utility on a big mud and you should see a big savings.  The
new version will be much more efficient so may take less than 50% of the
disk space needed for a stock binary pfile.  That's with no compression.

> Of course, in the current code, there is still a need for random
> access of the drive to find the object files.

Exactly, which is why I've offered to put rent and mail in the same file
as player data in the new system.  It probably won't happen, though,
because it hasn't generated much interest.  Even so, because it's a
self-maintaining system (players will be automatically removed based on
timeout criteria from the purgeplay.c utility), inode usage should not get
out of hand.

> But there is the issue of parsing the entire thing, and then rewriting
> it, when a player attempts to log in.  Or when they login with a bad
> password.  Or any number of other things -- parsing the entire file
> could be painfully slow.

The same is true for the binary pfiles.  Seek time will be shorter in
binary, but read-write time will actually be shorter in ascii due to
a smaller amount of data being used.

> Also we lose the capability to, say, find out just how much gold is in
> the players' posession.  Maybe not a huge loss, but it is useful
> information for an economy.  It makes finding info and statistics on
> players rather difficult.  Again, maybe not something commonly done,
> but it is a useful option.

"stat file" works the same way in ascii as it does in binary. If you want
gold stats on a regular basis, you could add it to the player_table, as
I've done with player level and last login for automaintenance purposes.

> If the desire is ease of modification of the database entries, then
> perhaps some form of editor could be made.   A text-based one (not
> even ncurses, just prompt driven) could go a long way.

I agree.  An editor would make the binary pfiles much easier to edit
offline.  Currently no such editor exists.


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST