Re: Circlemud design issues (DB Storage)

From: Tony Maro (tmaro@TACSYS.COM)
Date: 04/24/98


I'm currently coding a multi-threaded MUD (and researching Circle here) using
Delphi and Foxpro's engine for storage.  I would LOVE to be able to have ALL
of the players data, etc in the DB at all times, but I find that I must load what
is currently being used into memory to handle a decent number of connections
at reasonable speed.  The DB is used for loading zones, items, players etc
and long term storage.  This means that editing a players stat in the DB would
have NO effect unless I then update the active copy in memory (assuming they
are logged in)

The DOWNSIDE (and what makes Circle so good) is the processor overhead
to run the DB engine.  The DB simplifies things greatly, but it certainly doesn't
speed things up or save resources.

Oh, I like your tagline.

-----Original Message-----
From:   Rob Baumstark [SMTP:shirak@CONNECT.AB.CA]
Sent:   Friday, April 24, 1998 1:56 PM
To:     CIRCLE@post.queensu.ca
Subject:        Re:  Circlemud design issues

   I'd like to suggest a third alternative for storing players (It has been
mentioned before, but I think it should be again here.)  What about storing
everything in an external SQL database?  There are plenty of free small and
fast SQL compliant servers out there for Unix and Windows.  Besides making
loading/saving extremly easy and fast (SQL server code is FAR more optimized
then Circle's load/save code will ever be), it also makes for very easy
searches for players (removes the need for the player index), and it could
allow for much more functionality in the MUD for Implementors.  I would love
to be able to type in "Find players where level > 50", and have it give them
all back.  It would be easy to parse that, and change it to SQL (Wouldn't
want people to type in direct SQL.)
   Player editing would also be easy with SQL (assuming you know some basic
SQL)  Changing a players gold would just be "UPDATE Players SET Gold = 300
WHERE Name = 'Joe'"   The playerpurge util could be replaced just by "DELETE
FROM Players WHERE DATEDIFF(dd, GETDATE(), Last_Logon) > 30" (I'm familiar
with TransactSQL from MS SQL Server, but it should be very similar or the
same for other DBMS's)
   This could be taken farther, and put the entire world into the DBMS, but
I think that it would make building much harder, as all building would have
to be done through OLC.
------------------------------------------------------------
G:  "If we do happen to step on a mine, Sir, what do we do?"
EB: "Normal procedure, Lieutenant, is to jump 200 feet in
     the air and scatter oneself over a wide area."
-- Somewhere in No Man's Land, BA4
------------------------------------------------------------


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST