<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ?? -->
<!--X-From-R13: [ngg Qunggreyrl <znggNzcp.qla.zy.bet> -->
<!--X-Date: Sun, 22 Mar 1998 12:44:11 +0000 -->
<!--X-Message-Id: Pine.LNX.3.96.980322122912.390B-100000#mpc,dyn.ml.org -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.LNX.3.96.980321223049.1095A-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:matt#mpc,dyn.ml.org">
</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>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
Date:
[ <a href="msg00811.html">Previous</a>
| <a href="msg00813.html">Next</a>
]
Thread:
[ <a href="msg00827.html">Previous</a>
| <a href="msg00814.html">Next</a>
]
Index:
[ <A HREF="author.html#00812">Author</A>
| <A HREF="#00812">Date</A>
| <A HREF="thread.html#00812">Thread</A>
]
<!--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 <<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>: Matt Chatterley <<A HREF="mailto:matt#mpc,dyn.ml.org">matt#mpc,dyn.ml.org</A>></LI>
<LI><em>Date</em>: Sun, 22 Mar 1998 12:43:49 +0000 (GMT)</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:neddy#itl,net">neddy#itl,net</A></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, Ben Greear wrote:
> I'm contemplating a space based game, where once started, it will
> never again resemble it's starting state (unless the starting world
> image is saved of course.) It will be written in Java.
Well, this sounds intruiging. I've also been wanting to write a server in
Java to see how well its object-orientated model maps to the purpose (very
well I should imagine, particularly if any 'on-line' coding can also be
done in Java - although it sounds like you will not have anything of
this sort). Actually this project sounds like one of the popular
'strategy' or 'warfare' type games, and very interesting indeed.
>
> The game will need to update it's persistant storage very often
> to make this feasible.
Yeah, I can imagine. This is going to be your main problem, I think. :)
> In my current game, I use ascii based flat files. I don't think
> this will work so well for the space game.
I doubt it. You could end up with very large files, plus, I find that
ASCII is awkward to work with when loading in data on a large scale. An
advantage is that if the file layout is predictable and constant, you can
update bits easily in java (RandomAccessFile).
> The two things I'm pondering now are binary flat files (one per object,
> a collection of objects?? I dunno) or a database.
The former depends on the design structure of the server - if you can
sanely order it into a series of binary files and it won't be too
inconvenient to work with them, maybe, otherwise a database might be a
good move. I think your own binary files or ASCII files would be the best
bet (perhaps ASCII if it were kept compressed, since the amount of data
should be large).
> I'm a little concerned about the performance hit on a DB, as I expect
> this game server to bring a machine to it's knees anyway...
>
> I'd be interested to hear any suggestions you might have..
A point to remember: Have the game *constantly* saving *small* amounts of
data. Don't attempt to do what bases like PennMUSH do and dump a large
amount of data at a regular interval - this causes quite a few problems
(or rather, will if you are saving more than a few megabytes).
> Also, as a java server, I don't think I can do a select on incomming
> data. I think a thread for every player is a bit much...any suggestions
> here?
You're going to need one ServerSocket per player, aren't you?
If I am correct in this assumption, there is no problem - you can use one
thread to read from them, identifying connections by the socket they are
connected to.
If not, you can either use one thread/socket, and require a custom client,
which attaches an identifier to data sent (possibly using something like
DataGramPacket, where one part of the packet is the identifier), or just
use one thread per player - this doesn't seem overly excessive to me. :)
--
Regards,
-Matt Chatterley
Spod: <A HREF="http://user.super.net.uk/~neddy/spod/spod.html">http://user.super.net.uk/~neddy/spod/spod.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="00889" HREF="msg00889.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>
<ul compact><li><em>From:</em> Adam Wiggins <nightfall#user2,inficad.com></li></ul>
<li><strong><A NAME="00856" HREF="msg00856.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>
<ul compact><li><em>From:</em> J C Lawrence <claw#under,engr.sgi.com></li></ul>
<li><strong><A NAME="00826" HREF="msg00826.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>
<ul compact><li><em>From:</em> Ben Greear <greear#cyberhighway,net></li></ul>
<li><strong><A NAME="00814" HREF="msg00814.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>
<ul compact><li><em>From:</em> Joel Dillon <emily#cornholio,new.ox.ac.uk></li></ul>
</UL></LI></UL>
<!--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 <greear#cyberhighway,net></LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00811.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00813.html">Re: [MUD-Dev] Parlez vous NPC?</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00827.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00814.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#00812"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00812"><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>
<ul compact>
<LI><strong><A NAME="00893" HREF="msg00893.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:40 GMT
</LI>
</ul>
<LI><strong><A NAME="00881" HREF="msg00881.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 25 Mar 1998, 04:53 GMT
<UL>
<LI><strong><A NAME="00924" HREF="msg00924.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 01 Apr 1998, 00:49 GMT
</LI>
</UL>
</LI>
</ul>
</ul>
<LI><strong><A NAME="00827" HREF="msg00827.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:05 GMT
</LI>
</ul>
<LI><strong><A NAME="00812" HREF="msg00812.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>, Sun 22 Mar 1998, 12:44 GMT
<UL>
<LI><strong><A NAME="00814" HREF="msg00814.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>, Sun 22 Mar 1998, 12:50 GMT
<UL>
<LI><strong><A NAME="00815" HREF="msg00815.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>, Sun 22 Mar 1998, 13:40 GMT
<UL>
<LI><strong><A NAME="00816" HREF="msg00816.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>, Sun 22 Mar 1998, 13:55 GMT
</LI>
<LI><strong><A NAME="00817" HREF="msg00817.html">Another recruit for the list?</A></strong>,
Joel Dillon <a href="mailto:emily#cornholio,new.ox.ac.uk">emily#cornholio,new.ox.ac.uk</a>, Sun 22 Mar 1998, 15:29 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</LI>
</UL></BLOCKQUOTE>
</ul>
<hr>
<center>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
</center>
<hr>
</body>
</html>