<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: [MUD-Dev] Database back ends --> <!--X-From-R13: Yriva Zvggyrwbua <qnevhfNpbaarpg.pbz.nh> --> <!--X-Date: Wed, 19 Apr 2000 16:15:02 -0700 --> <!--X-Message-Id: 200004192313.JAA19079@nara.off.connect.com.au --> <!--X-Content-Type: text/plain --> <!--X-Reference: 20000419221346.10229.qmail@wafer.donet.com --> <!--X-Reference: C07FC03B3050D311A45800600821481D03B4F7E6@logixmail.saleslogix.com --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, Re: [MUD-Dev] Database back ends</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:darius@connect.com.au"> </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="msg00477.html">Previous</a> | <a href="msg00479.html">Next</a> ] Thread: [ <a href="msg00486.html">Previous</a> | <a href="msg00468.html">Next</a> ] Index: [ <A HREF="author.html#00478">Author</A> | <A HREF="#00478">Date</A> | <A HREF="thread.html#00478">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>Re: [MUD-Dev] Database back ends</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> <LI><em>Subject</em>: Re: [MUD-Dev] Database back ends </LI> <LI><em>From</em>: Kevin Littlejohn <<A HREF="mailto:darius#connect,com.au">darius#connect,com.au</A>></LI> <LI><em>Date</em>: Thu, 20 Apr 2000 09:13:03 +1000</LI> <LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> <LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#kanga,nu</A></LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> >>> Greg Underwood wrote > > dwacks#saleslogix,com writes: > > > My question is: In general how do you feel about using a DB back end and > > what problems do you see with this. > > Basically, as with anything in computers, it's a set of trade-offs. Do you > want flexability and easy crash recovery/less crashes? Put more in the DB. > Do you want to be able to run 5000 players online at once? Methinks > you'll need something more custom-built. Funny story: In tinkering with exactly this, I've found it _is_ possible to write cacheing systems that severely slow things down ;) Seriously, most modern db systems are designed to deal with _lots_ of requests per second - your average mud shouldn't stress your average db. However, there's an added few milliseconds on every request which has to be dealt with. In the end, cacheing is probably a good idea somewhere along the line, depending on your design - if you're holding everything in db for persistance. If you're just using the db as a load/save store area, then most of this is irrelevant - you'll not stress the db, go for your life ;) Incidentally, 5000 players online at once would suggest to me that a db is a good idea - if for nothing else than for it's backup and replication abilities. > A fascinating thought I had a while ago was that, well, since the data > structures by and large determine the way the game works, wouldn't it be > neet to have spells that could actually alter the structure of the > database? I mean, SQL commands can let you do things like add and drop > tables, fields etc. Why limit the scope of the spells to simply altering > values within the tables? Because usually the table structure has no bearing on anything in-game? My tables are in form: CREATE TABLE attributes ( id int(11) DEFAULT '0' NOT NULL, name varchar(32) DEFAULT '' NOT NULL, last_update timestamp(14), value text, value_type varchar(20) DEFAULT 'string' NOT NULL, value_exist char(1) DEFAULT 'Y' NOT NULL, PRIMARY KEY (id,name) ); (MySQL create statement). id is object id that owns this attribute, name is name of attribute, value is value of attribute, value_type indicates how to de-munge the value I've stored to get the right thing (text fields in MySQL act close enough to blobs, so in essence I store a text representation of any value, and know how to convert it back). last_update isn't actually used atm. value_exist is part of my wierd inheritance scheme. Modifying this structure would be fairly pointless ;) There are some funky things you can do quickly in SQL, tho - give someone a spell that tells them where the nearest x is, and finding the locations of all the x's is at least considerably faster. (Then you've got to figure out proximity, but that's another story ;). Global spells - something that adds a temporary +1 to all swords in the world - are easier via SQL ;) Oh, in inheritance world, changing all descendants of object x to be descendants of object y is easier in SQL, too. This stuff has been discussed before in the archives - worth doing a quick browse through them. Search for 'MySQL' is probably the quickest and easiest way to find info ;) KevinL _______________________________________________ MUD-Dev mailing list MUD-Dev#kanga,nu <A HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A> </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="00474" HREF="msg00474.html">Re: [MUD-Dev] Database back ends</A></STRONG> <UL><LI><EM>From:</EM> Greg Underwood <gunderwood@donet.com></LI></UL></LI> <LI><STRONG><A NAME="00467" HREF="msg00467.html">[MUD-Dev] Database back ends</A></STRONG> <UL><LI><EM>From:</EM> dwacks@saleslogix.com</LI></UL></LI> </UL></LI></UL> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00477.html">Re: [MUD-Dev] Database back ends</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00479.html">RE: [MUD-Dev] Fun and Learning in games</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00486.html">[MUD-Dev] [Mud-Dev]: Sushi Mud</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00468.html">[MUD-Dev] defeating twinking through game mechanics</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00478"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00478"><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>[MUD-Dev] Massive Connections</STRONG>, <EM>(continued)</EM> <ul compact> <ul compact> <LI><strong><A NAME="00481" HREF="msg00481.html">[MUD-Dev] Massive Connections</A></strong>, Christopher Kohnert <a href="mailto:cjkohner@mail.uccs.edu">cjkohner@mail.uccs.edu</a>, Thu 20 Apr 2000, 01:34 GMT <UL> <LI><strong><A NAME="00483" HREF="msg00483.html">Re: [MUD-Dev] Massive Connections</A></strong>, Kevin Scott London <a href="mailto:london@cs.utk.edu">london@cs.utk.edu</a>, Thu 20 Apr 2000, 02:52 GMT <UL> <LI><strong><A NAME="00484" HREF="msg00484.html">Re: [MUD-Dev] Massive Connections</A></strong>, Christopher Kohnert <a href="mailto:cjkohner@mail.uccs.edu">cjkohner@mail.uccs.edu</a>, Thu 20 Apr 2000, 03:30 GMT <UL> <LI><strong><A NAME="00486" HREF="msg00486.html">[MUD-Dev] [Mud-Dev]: Sushi Mud</A></strong>, Todd McKimmey <a href="mailto:rufus@wombatgames.com">rufus@wombatgames.com</a>, Thu 20 Apr 2000, 22:08 GMT </LI> </UL> </LI> </UL> </LI> </UL> </LI> </ul> <LI><strong><A NAME="00478" HREF="msg00478.html">Re: [MUD-Dev] Database back ends</A></strong>, Kevin Littlejohn <a href="mailto:darius@connect.com.au">darius@connect.com.au</a>, Wed 19 Apr 2000, 23:15 GMT </LI> </ul> </LI> <LI><strong><A NAME="00468" HREF="msg00468.html">[MUD-Dev] defeating twinking through game mechanics</A></strong>, S. Patrick Gallaty <a href="mailto:choke@sirius.com">choke@sirius.com</a>, Wed 19 Apr 2000, 18:55 GMT <UL> <LI><strong><A NAME="00488" HREF="msg00488.html">Re: [MUD-Dev] defeating twinking through game mechanics</A></strong>, Travis S. Casey <a href="mailto:efindel@io.com">efindel@io.com</a>, Thu 20 Apr 2000, 22:08 GMT </LI> </UL> <UL> <li><Possible follow-up(s)><br> <LI><strong><A NAME="00480" HREF="msg00480.html">Re: [MUD-Dev] defeating twinking through game mechanics</A></strong>, jolson <a href="mailto:jolson@micron.net">jolson@micron.net</a>, Thu 20 Apr 2000, 00:09 GMT <UL> <LI><strong><A NAME="00482" HREF="msg00482.html">Re: [MUD-Dev] defeating twinking through game mechanics</A></strong>, adam <a href="mailto:adam@treyarch.com">adam@treyarch.com</a>, Thu 20 Apr 2000, 01:34 GMT </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>