1998Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev]  World Persistence, flat files v/s DB v/s ?? -->
<!--X-From-R13: Pra Uerrne <terrneNploreuvtujnl.arg> -->
<!--X-Date: Sun, 22 Mar 1998 20:00:40 +0000 -->
<!--X-Message-Id: Pine.LNX.3.96.980322125024.3549B&#45;100000#shamen,cyberhighway.net -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.LNX.3.96.980322122912.390B&#45;100000#mpc,dyn.ml.org -->
<!--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:greear#cyberhighway,net">
</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="msg00825.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00827.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00891.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00829.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00826">Author</A>
&nbsp;|&nbsp;<A HREF="#00826">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00826">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>: mud-dev &lt;<A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A>&gt;</LI>
<LI><em>Subject</em>: Re: [MUD-Dev]  World Persistence, flat files v/s DB v/s ??</LI>
<LI><em>From</em>: Ben Greear &lt;<A HREF="mailto:greear#cyberhighway,net">greear#cyberhighway,net</A>&gt;</LI>
<LI><em>Date</em>: Sun, 22 Mar 1998 12:59:43 -0700 (MST)</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>

On Sun, 22 Mar 1998, Matt Chatterley wrote:

&gt; On Sat, 21 Mar 1998, Ben Greear wrote:
&gt; 
&gt; &gt; I'm contemplating a space based game, where once started, it will
&gt; &gt; never again resemble it's starting state (unless the starting world
&gt; &gt; image is saved of course.)  It will be written in Java.
&gt; 
&gt; Well, this sounds intruiging. I've also been wanting to write a server in
&gt; Java to see how well its object-orientated model maps to the purpose (very
&gt; well I should imagine, particularly if any 'on-line' coding can also be
&gt; done in Java - although it sounds like you will not have anything of
&gt; this sort). Actually this project sounds like one of the popular
&gt; 'strategy' or 'warfare' type games, and very interesting indeed.

It will indeed be strategy/warfare game.  It will be up to the players
to decide the atmosphere though..I will just build a universe for
them to play in :)

&gt;  
&gt; &gt; 
&gt; &gt; The game will need to update it's persistant storage very often
&gt; &gt; to make this feasible. 
&gt; 
&gt; Yeah, I can imagine. This is going to be your main problem, I think. :)

Yep, I've got the rest mapped out pretty well, but I just can't get
a happy answer for the persistant storage...

&gt;  
&gt; &gt; In my current game, I use ascii based flat files.  I don't think
&gt; &gt; this will work so well for the space game.
&gt; 
&gt; I doubt it. You could end up with very large files, plus, I find that
&gt; ASCII is awkward to work with when loading in data on a large scale. An
&gt; advantage is that if the file layout is predictable and constant, you can
&gt; update bits easily in java (RandomAccessFile).

There will be much data.  I'll need to do updates very often, and
considering the dynamic nature of the game, I will almost have to do
a complete write, all at once, in order to make sure the state is
sane.  (Consider a ship moving between two quadrants, write one quadrant,
move ship, write the other...now we are all hosed up!)

The other idea would be to write on every change, and just write what
changed.  If this was done by another thread, and cached decently..it
might work...  The problem then becomes one of mapping data into files,
which I absolutely fear :P


&gt; The former depends on the design structure of the server - if you can
&gt; sanely order it into a series of binary files and it won't be too
&gt; inconvenient to work with them, maybe, otherwise a database might be a
&gt; good move. I think your own binary files or ASCII files would be the best
&gt; bet (perhaps ASCII if it were kept compressed, since the amount of data
&gt; should be large).

I'd wrather deal with binary than compressed stuff.  The objects will
have to be able to migrate between servers (each server will encompass one
solar system, and hopefully there will be many solar systems linked
through sockets, either on one machine, a cluster of work stations, or
indeed, across the net..).  The point of this last sentence is that
I will have to make it write binary to a stream anyway...

&gt; A point to remember: Have the game *constantly* saving *small* amounts of
&gt; data. Don't attempt to do what bases like PennMUSH do and dump a large
&gt; amount of data at a regular interval - this causes quite a few problems
&gt; (or rather, will if you are saving more than a few megabytes).

There are problems with both to be sure...


Ben Greear (greear#cyberhighway,net)  <A  HREF="http://www.primenet.com/~greear">http://www.primenet.com/~greear</A> 
Author of ScryMUD:  mud.primenet.com 4444
<A  HREF="http://www.primenet.com/~greear/ScryMUD/scry.html">http://www.primenet.com/~greear/ScryMUD/scry.html</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="00858" HREF="msg00858.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>
<ul compact><li><em>From:</em> J C Lawrence &lt;claw#under,engr.sgi.com&gt;</li></ul>
<li><strong><A NAME="00829" HREF="msg00829.html">Re: [MUD-Dev]  World Persistence, flat files v/s DB v/s ??</A></strong>
<ul compact><li><em>From:</em> "Jon A. Lambert" &lt;jlsysinc#ix,netcom.com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00812" HREF="msg00812.html">Re: [MUD-Dev]  World Persistence, flat files v/s DB v/s ??</A></STRONG>
<UL><LI><EM>From:</EM> Matt Chatterley &lt;matt#mpc,dyn.ml.org&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00825.html">Re: [MUD-Dev] Dynamic Loading of Modules</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00827.html">Re: [MUD-Dev]  World Persistence, flat files v/s DB v/s ??</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00891.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00829.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#00826"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00826"><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>
<ul compact>
<ul compact>
<LI><strong><A NAME="00855" HREF="msg00855.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:38 GMT
<UL>
<LI><strong><A NAME="00872" HREF="msg00872.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
Joel Dillon <a href="mailto:emily#cornholio,new.ox.ac.uk">emily#cornholio,new.ox.ac.uk</a>, Tue 24 Mar 1998, 08:16 GMT
<UL>
<LI><strong><A NAME="00879" HREF="msg00879.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>, Wed 25 Mar 1998, 00:17 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00891" HREF="msg00891.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
Matt Chatterley <a href="mailto:matt#mpc,dyn.ml.org">matt#mpc,dyn.ml.org</a>, Wed 25 Mar 1998, 08:17 GMT
</LI>
</UL>
</LI>
</ul>
</ul>
<LI><strong><A NAME="00826" HREF="msg00826.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:00 GMT
<UL>
<LI><strong><A NAME="00829" HREF="msg00829.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:08 GMT
</LI>
<LI><strong><A NAME="00858" HREF="msg00858.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:43 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00856" HREF="msg00856.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:38 GMT
</LI>
<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
</LI>
</ul>
</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>