1998Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev]  World Persistence, flat files v/s DB v/s ?? -->
<!--X-From-R13: @nguna T Kbfcr <lbfcrNunjnvv.rqh> -->
<!--X-Date: Tue, 31 Mar 1998 18:23:55 +0000 -->
<!--X-Message-Id: Pine.GSO.3.95q.980331080244.11711A&#45;100000@uhunix2 -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.LNX.3.96.980330221641.341B&#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:yospe#hawaii,edu">
</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="msg00918.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00920.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00918.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00925.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00919">Author</A>
&nbsp;|&nbsp;<A HREF="#00919">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00919">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>: Nathan F Yospe &lt;<A HREF="mailto:yospe#hawaii,edu">yospe#hawaii,edu</A>&gt;</LI>
<LI><em>Date</em>: Tue, 31 Mar 1998 08:23:33 -1000</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Mon, 30 Mar 1998, Ben Greear wrote:

:On Mon, 30 Mar 1998, Orion Henry wrote:

:&gt; This is where you can have a little fun.  These records are people...
:&gt; places.. things... whatever you need to use for your mud.  Each contains
:&gt; references (unique ID's, not pointers) to other records.  Lets say that the
:&gt; back end process ( the one that holds the "snapshot" ) holds a huge number
:&gt; of records and the ones it dosnet have RAM for (if you dont have enough)
:&gt; are written to disk.  Your front end process (the MUD) holds less, say
:&gt; MAX_RECORDS.  Each time a refrence is dereferenced it checks the local
:&gt; cache and if its not there its requests it from the back end process.  When
:&gt; the number of local records exceeds MAX_RECORDS it drops the oldes ones (
:&gt; LRU or Clock algorithms will do nicely).  Now dont panic... I see the
:&gt; problems with this too.  There's more.

:&gt; 1) Whenever a record's reference is dereferenced, the front end process
:&gt; fetches all the recrods associated with it... Thus, when you dereference
:&gt; Boffo the Half-Troll you also bring over his moth eaten shirt.  His deadly
:&gt; tree branch.  His manky underwear and the room he's in.  (because you will
:&gt; proboly reference all of this very shorty after looking at Boffo) This way
:&gt; when you make a reference its (probobly) always there...  

:&gt; 2) Whenever a record is changed it is marked as dirty and schedueled for
:&gt; upload back to the back end... otherwise its just forgotten when it falls
:&gt; off the LRU list.

:This model would work fine for a MUD, but my game will have every object
:in motion of some kind.  I'm using F=MA, and all the fun that goes with
:it, including a partial gravity computation (I'll re-compute every now and
:then, and adjust orbits accordingly.)

If all you're using is F=MA, there's no reason to compute motion when it is
not being observed. Even with the partial gravity computation. I assume you
use a third order two body equation of motion, for most cases, and a second
order expansion of the Hamiltonian (using precalculated constants) for more
complex systems. I would hate to think what the effect of doing a mass-mass
force calculation and extrapolating would be. (And have I really been using
sixth order equoms in my software for over four years? That's what this old
software development file says.) I've been doing a much more complex status
check (thermodynamics, fluid dynamics, friction depreciated mechanics, most
of the complex elements of complex bodies, but only when they are observed)
without having to keep anything but a bare minimum instantiated, po6 forbid
actually computing it all. The nice thing about physics is, it all works if
you watch it, but there's ways to get from point A to point B without going
straight down the line. And they often amount to folding the map... without
walking down the fold. In other words, calculate what you need to, estimate
what you can, and fudge what you have to. If you do it well enough, noone's
gonna ever find out. Or maybe someone will... "Hey, guess what! I think the
server doesn't actually make a tree fall in the forest if noone is there to
hear it! It just becomes fallen!"

:Basically, with the AI, the game should remain at almost constant levels
:of computation/action, regardless of the number of ppl logged on.  Of
:course, many things will be just estimated, for example, a battle between
:two AI clans won't do a lot of the details if no one is watching...but
:the end results should be about the same.

Well... yes. But... why compute it at all? I mean, if it is something where
a computation can get you most of the intermediate... and randomized fudges
can get you something as good as... it seems wasteful to have the CPU going
for nothing. This does depend, of course, on the complexity of the AIs. For
really complex AIs, I pretend they are players too. In fact, I'm looking at
making the AIs remotely hosted and dialing them into the main computer, the
same way I would a PC.

:&gt; Sockets and pipes would work well for this but (I'm not sure) but I think
:&gt; that unix messages will be very fast for this implimentation.

:I'm using Java, so probably going to use sockets, as that seems to be
:the least common denominator across platforms.  The DB itself will just
:be an object I instantiate in the server program...(and clients too I
:guess.)

Java for the host? I'm using it for my clients now (got to see how well the
Metrowerks java-to-native compilers for MacOS and Win32 work... they may be
just what I need.)
-- 

Nathan F. Yospe - Aimed High, Crashed Hard, In the Hanger, Back Flying Soon
Jr Software Engineer, Textron Systems Division (On loan to Rocketdyne Tech)
(Temporarily on Hold) Student, University of Hawaii at Manoa, Physics Dept.
yospe#hawaii.edu nyospe#premier.mhpcc.af.mil <A  HREF="http://www2.hawaii.edu/~yospe/">http://www2.hawaii.edu/~yospe/</A>



</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00926" HREF="msg00926.html">Re: [MUD-Dev]  World Persistence, flat files v/s DB v/s ??</A></strong>
<ul compact><li><em>From:</em> Vadim Tkachenko &lt;vt#freehold,crocodile.org&gt;</li></ul>
<li><strong><A NAME="00925" HREF="msg00925.html">Re: [MUD-Dev]  World Persistence, flat files v/s DB v/s ??</A></strong>
<ul compact><li><em>From:</em> Ben Greear &lt;greear#cyberhighway,net&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00918" HREF="msg00918.html">Re: [MUD-Dev]  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="msg00918.html">Re: [MUD-Dev]  World Persistence, flat files v/s DB v/s ??</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00920.html">Re: [MUD-Dev] META: Broken mail headers</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00918.html">Re: [MUD-Dev]  World Persistence, flat files v/s DB v/s ??</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00925.html">Re: [MUD-Dev]  World Persistence, flat files v/s DB v/s ??</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00919"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00919"><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="00889" HREF="msg00889.html">Re: [MUD-Dev]  World Persistence, flat files v/s DB v/s ??</A></strong>, 
Adam Wiggins <a href="mailto:nightfall#user2,inficad.com">nightfall#user2,inficad.com</a>, Wed 25 Mar 1998, 07:18 GMT
<UL>
<LI><strong><A NAME="00901" HREF="msg00901.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>, Thu 26 Mar 1998, 04:54 GMT
<UL>
<LI><strong><A NAME="00917" HREF="msg00917.html">Re: [MUD-Dev]  World Persistence, flat files v/s DB v/s ??</A></strong>, 
Orion Henry <a href="mailto:orionZ#ix,netcom.com">orionZ#ix,netcom.com</a>, Tue 31 Mar 1998, 02:42 GMT
<UL>
<LI><strong><A NAME="00918" HREF="msg00918.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>, Tue 31 Mar 1998, 05:22 GMT
<UL>
<LI><strong><A NAME="00919" HREF="msg00919.html">Re: [MUD-Dev]  World Persistence, flat files v/s DB v/s ??</A></strong>, 
Nathan F Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Tue 31 Mar 1998, 18:23 GMT
<UL>
<LI><strong><A NAME="00925" HREF="msg00925.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>, Wed 01 Apr 1998, 04:41 GMT
</LI>
<LI><strong><A NAME="00926" HREF="msg00926.html">Re: [MUD-Dev]  World Persistence, flat files v/s DB v/s ??</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Wed 01 Apr 1998, 05:33 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
<LI><strong><A NAME="00818" HREF="msg00818.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
Greg Munt <a href="mailto:greg#uni-corn,demon.co.uk">greg#uni-corn,demon.co.uk</a>, Sun 22 Mar 1998, 17:36 GMT
<UL>
<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
</LI>
</UL>
</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>