Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > Advanced MUD Concepts
Click here to Register

Reply
 
Thread Tools
Old 01-08-2004, 01:17 AM   #1
Mierza
Member
 
Join Date: Jan 2003
Location: Hope Valley, Perth, Australia.
Posts: 33
Mierza is on a distinguished road
Send a message via MSN to Mierza
Just wondering about storage modules. A coder left a question to me asking if we should use flat files, or maybe a database like MySQL or PostgreSQL.

Does anyone with experience here have any insight into the differences and pro's vs con's?
Mierza is offline   Reply With Quote
Old 01-08-2004, 04:10 AM   #2
Traithe
Member
 
Join Date: Jan 2003
Name: Kite
Posts: 131
Traithe is on a distinguished road
Hrm... was never formally educated in this stuff and I haven't done any research on benchmarks and so forth, so I can't comment as to resource or speed issues...

I can tell you, though, that we moved to a mySQL backend at SoI awhile ago... and while it took some time to get used to and write commands and a website to utilize it, it was most definitely worth it. Really increased our ability to track the huge amounts of information that get generated, even by a moderately-sized playerbase.

It isn't too hard to pick up, either. I went from knowing next to nothing about mySQL and PHP to being able to convert our back-end and write up a dynamic website that utilized it in a couple months. Just takes some reading and patience.
Traithe is offline   Reply With Quote
Old 01-17-2004, 12:52 AM   #3
Kylotan
Member
 
Join Date: Jun 2003
Location: Nottingham, UK
Home MUD: Abattoir (Smaug)
Home MUD: ex-Jellybean (Smaug)
Home MUD: ex-Dark Chambers (Merc)
Posts: 174
Kylotan is on a distinguished road
Send a message via ICQ to Kylotan Send a message via AIM to Kylotan Send a message via MSN to Kylotan Send a message via Yahoo to Kylotan
I guess it depends on how much data you store, and how quickly you need access to it. Relational databases are not the ideal format for mud-style data queries so you often end up with most of your data cached in memory anyway. They would reduce the amount of time you have to spend on working out file formats and the like, but if your coder has to ask you which is better, then I'm sadly guessing that they don't know enough about normalisation of data to be able to reap all the benefits of the relational data model.
Kylotan is offline   Reply With Quote
Old 02-13-2004, 01:05 PM   #4
xanes
New Member
 
Join Date: Feb 2003
Posts: 29
xanes is on a distinguished road
The database question comes up a lot.  I think you just can't put all your eggs or data in one basket.  Databases are fast, but RAM is faster.  

RAM is, also, often in short supply as requirements become arbitrarily large.  

As I see it, area data for a MASSIVE game might stand to benefit from a db, because unused (empty of PC) areas could be loaded and unloaded fairly painlessly.  

Another benefit I suppose, is that you could have a persistent connection to the DB for each player, and you could, with a little overhead, sync their player data with them pretty seamlessly.  That'd cut down on reimbursements, I suppose.

Also, the transferrability of data in a DB opens up the doors for all sorts of ideas that +might+ be worth looking at. A mySQL dataset would make a web-based building app not much of a headache....

In short, you just have to do what makes sense on a case by case basis.  Moderation in all things, yes?


-X
xanes is offline   Reply With Quote
Old 02-13-2004, 07:36 PM   #5
Yui Unifex
Senior Member
 
Join Date: Apr 2002
Location: Florida
Posts: 323
Yui Unifex is on a distinguished road
Send a message via ICQ to Yui Unifex Send a message via AIM to Yui Unifex
Question

My own codebase, Aetas, uses a PostgreSQL backend. My codebase before that, Deus, used a MySQL backend. In my experience, using a relational database to store mud information is just so much more conveniant and flexible than not. If your mud just uses a dumb 'load everything on boot' model, and you only index by one value, then a relational database is probably not for you.

A relational database is immensely useful when using lazy loading. Our system only loads from disk an object that has been specifically requested, so it's very easy to do e.g. SELECT * FROM rooms WHERE elementid = X, or SELECT * FROM rooms WHERE name = 'Y'. Typical mud databases are poorly built for this kind of thing, because they tend to group collections of rooms / npcs / objects into area files that make seeking and updating specific items difficult. The database is also useful for searching within data for a match, such as when you want the builder equivalent of 'grep' to find bits and pieces of information.

As for accessing MUD data outside of the database, I may be getting off topic here but we use XML-RPC to query the MUD directly. This way we have no trouble keeping objects in sync. Fortunately implementing RPC methods is dead simple, as is making use of them in web builder apps
Yui Unifex is offline   Reply With Quote
Old 02-14-2004, 03:08 AM   #6
Lanthum
Member
 
Lanthum's Avatar
 
Join Date: Oct 2002
Location: Suburbs of Chicago
Posts: 138
Lanthum is on a distinguished road
Send a message via MSN to Lanthum
Does anyone know of any good sites with info or tutorials about how to use DBs?  I really want to use Dbs (either Access or MySQL) for certain aspects with my new codebase!  But I really don't know what I'm doing and I haven't been able to find any good sites with tutorials.  All it seems I can find is how-tos for .NET and VC++ specifically.

I know query structure and the like from an old class I took, but I have no idea how to connect to the Db from within my C++ program if it's not written for .NET or VC++.

Can anyone help?
Lanthum is offline   Reply With Quote
Old 02-14-2004, 05:51 AM   #7
fredrik
New Member
 
Join Date: Jan 2003
Posts: 5
fredrik is on a distinguished road
Talking

If you settle for MySQL, there's quite a lot of nice info on their own webpage, www.mysql.com, including their C and C++ APIs.
fredrik is offline   Reply With Quote
Old 02-14-2004, 06:44 PM   #8
Lanthum
Member
 
Lanthum's Avatar
 
Join Date: Oct 2002
Location: Suburbs of Chicago
Posts: 138
Lanthum is on a distinguished road
Send a message via MSN to Lanthum
Quote:
Originally Posted by (fredrik @ Feb. 14 2004,03:51)
there's quite a lot of nice info on their own webpage, www.mysql.com, including their C and C++ APIs.
I was reading that info along with a tutorial talking about those APIs. But, unless I'm confused which happens often - it seemed like those APIs were for VC++ and .NET only. And that you had to have specific .NET headers linked in. Did I confuse something? Can I use those APIs even on a UNIX non-.NET structure program?


Thanks for the help!
Lanthum is offline   Reply With Quote
Old 02-14-2004, 09:17 PM   #9
Yui Unifex
Senior Member
 
Join Date: Apr 2002
Location: Florida
Posts: 323
Yui Unifex is on a distinguished road
Send a message via ICQ to Yui Unifex Send a message via AIM to Yui Unifex
Question

MySQL C API. Of course you can use it in a UNIX non-.Net program. That is MySQL's principle audience.
Yui Unifex is offline   Reply With Quote
Reply


Thread Tools


Storage Modules - Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Storage System darmir Advanced MUD Concepts 0 03-16-2006 01:33 PM
MUD Storage Options Vopisk MUD Coding 1 03-25-2005 08:43 AM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 01:11 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2014