1998Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] World Persistence, flat files v/s DB v/s ?? -->
<!--X-From-R13: X Q Znjerapr <pynjNhaqre.rate.ftv.pbz> -->
<!--X-Date: Mon, 23 Mar 1998 20:41:31 +0000 -->
<!--X-Message-Id: 199803232016.MAA53288#under,engr.sgi.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.LNX.3.96.980321223049.1095A&#45;100000#shamen,cyberhighway.net -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:claw#under,engr.sgi.com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00856.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00858.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00859.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00809.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00857">Author</A>
&nbsp;|&nbsp;<A HREF="#00857">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00857">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ?? </LI>
<LI><em>From</em>: J C Lawrence &lt;<A HREF="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</A>&gt;</LI>
<LI><em>Date</em>: Mon, 23 Mar 1998 12:16:36 -0800</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Sat, 21 Mar 1998 21:52:10 PST8PDT 
Ben Greear&lt;greear#cyberhighway,net&gt; wrote:

&gt; I'm contemplating a space based game, where once started, it will
&gt; never again resemble it's starting state (unless the starting world
&gt; image is saved of course.)  It will be written in Java.

ie the sort of persistant would which is commonly discussed on this
list.

&gt; The game will need to update it's persistant storage very often to
&gt; make this feasible.

There are several possible models:

  Periodic backups of the DB state (eg once a day the entire game
state is written to disk, allowing the old state file to be made into
a backup)

  Periodic checkpoints to update the DB to current state (eg every 10
minutes the DB is updated with the current state)

  Continuous updating of the DB (write-through).

Plus all the combinational flavours of the above and the forms of the
above.

I've done all of these at various times.  Its worth noting that almost
the entire Tiny-* and MOO clan (into which latter camp fall Cold,
Cool, and Interlude) use one of the first two forms (Yes Brandon/Miro,
I know that's a little sloppy for Cold).

Write-through is expensive purely duie to bandwidth and disk latency
concerns.  Yet, its essentially what I am working on now.

&gt; In my current game, I use ascii based flat files.  I don't think
&gt; this will work so well for the space game.

It could be done, but it would pose problems.

&gt; The two things I'm pondering now are binary flat files (one per
&gt; object, a collection of objects?? I dunno) or a database.

File IO is your biggest killer.  File opens are incredibly expensive.
File closes aren't far behind.  Minimise them.

Pretty well everything that has inherited from Marcus' Ranum's UberMUD 
(eg all the Tiny-* clan) devolves to a DB with a text processing front 
end.  Its a highly successful model with thousands of them out there
running large complex worlds (cf LambdaMOO's Rube Goldberg machine).  

That said the choice of a DB as a backing store for a MUD world is not
automatic.  Its easy to argue against it.  Ever server model I've
worked on prior to now has used a DB (initially homegrown, more
recently based on tdbm, YOODA and LINCKS).  Currently I'm using a
persistant store-type approach (cf Arjuna, Texas Persistant Store,
Persist++, ObjectStore) as it promises to be a lot lighter weight and
much less design-invasive than the classical DB approach.

See the Free DB list at <A  HREF="http://solar.flare.net/FreeDB/">http://solar.flare.net/FreeDB/</A> for other
possibilities.

&gt; I'm a little concerned about the performance hit on a DB, as I
&gt; expect this game server to bring a machine to it's knees anyway...

No need.  Well written (!) disk-backed MUD servers can (often/usually
do) out-perform in-RAM MUD servers due to decreased page fault rate.
Marcus Ranum demonstrated this rather conclusively years ago with Uber
and Unter.  Cold continues to demonstrate this point.

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

</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00810" HREF="msg00810.html">World Persistence, flat files v/s DB v/s ??</A></STRONG>
<UL><LI><EM>From:</EM> Ben Greear &lt;greear#cyberhighway,net&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00856.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00858.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00859.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00809.html">Re: [MUD-Dev]	Parlez vous NPC?</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00857"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00857"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00828" HREF="msg00828.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Sun 22 Mar 1998, 20:15 GMT
<UL>
<LI><strong><A NAME="00831" HREF="msg00831.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sun 22 Mar 1998, 21:27 GMT
<UL>
<LI><strong><A NAME="00860" HREF="msg00860.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Mon 23 Mar 1998, 20:50 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00859" HREF="msg00859.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Mon 23 Mar 1998, 20:48 GMT
</LI>
</UL>
</LI>
</ul>
<LI><strong><A NAME="00857" HREF="msg00857.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Mon 23 Mar 1998, 20:41 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="00809" HREF="msg00809.html">Re: [MUD-Dev]	Parlez vous NPC?</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 21 Mar 1998, 18:10 GMT
<UL>
<LI><strong><A NAME="00813" HREF="msg00813.html">Re: [MUD-Dev] Parlez vous NPC?</A></strong>, 
Matt Chatterley <a href="mailto:matt#mpc,dyn.ml.org">matt#mpc,dyn.ml.org</a>, Sun 22 Mar 1998, 12:46 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00808" HREF="msg00808.html">Re: [MUD-Dev]	Dynamic Loading of Modules</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 21 Mar 1998, 17:58 GMT
<UL>
<LI><strong><A NAME="00825" HREF="msg00825.html">Re: [MUD-Dev] Dynamic Loading of Modules</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sun 22 Mar 1998, 19:31 GMT
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>