[MUD-Dev] fault tolerance and character files

Steven Fleischaker kuvasza at winterreach.com
Mon Apr 30 14:54:57 New Zealand Standard Time 2001


I saw some message a long time ago about read error rates on
commercial hard-drives.  A few bits wrong here and there can ruin your
day.  But for fun let's say that you're in California and the power
goes out during the last instant of a save to disk, at some moment
where the old files are deleted and the new files are replacing them.

What sort of procedures do you all follow for ensuring character files
can be loaded and/or responding to when the files appear to be
corrupt?

Do you keep two copies of every player's records (FIFO)?  So...

  on disk..
    last save
    save just before that

  saving to disk..
    delete 'save just before that'
    rename last save to 'save just before that'
    save to disk as 'last save'

  loading from disk
    load 'last save'

Or do you keep just one copy and cross fingers?  Assuming all your
characters and everything else is not in a single database.

Do you assume that each record is intact or do you have separate
routines that perform logic checks on your character files to make
sure that all the pieces are there in their proper relations? 
(beltpouch1 in beltpouch2 in beltpouch1 is one very foolish error that
comes to mind if a few bits get crossed).

Does your load process have checks in it to make this sort of nonsense
impossible?

Does this sort of thing tend to bring your entire system down and does
it occur very often?

What sort of immediate messages and support do you give your players
under those circumstances?  Do you try to replace goods/items/exp or
do you go back to the last backup and pat them on the head?

Do you have checks in your game environment to guard against artifact
duplication?  I'm assuming if you have to fall back on someone's old
character file to get them back online, you run the risk of getting
the file from before Bilbo gave the Ring to Frodo in the envelope, so
now both Bilbo and Frodo have The One Ring.*

Steven
kuvasza at winterreach.com

_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the MUD-Dev mailing list