Re: [CODE] Just a thought

From: Patrick Dughi (dughi@imaxx.net)
Date: 08/11/00


> On the thought of Databases, am I missing something? I admit Im new to
> the Circle world.  What would be wrong with a database for storing info?
> Isnt everything loaded when a person logs on for the user info, and all
> the objects/mobs/etc are loaded at startup?  And only when you manually
> do a save do they change.  How would this be bad if using a Database?
>
> I dont see any lockups do to volume if you set it up right.  Ive set up tons
> of web based db's with multi-access at once and never had a problem.

        Well, the difference between the stateless connection of a
web-based system which is individual transaction based, and a multiuser
single thread system is immense.

        Have you ever scheduled a flight online, or searched for a book
using amazon?  The results comeback pretty quick, usually the new pages
load up in 30 seconds or so (not including graphics, this is time the
program takes to 'think').  No one pays this any mind because
individually, it's negligable.  Now think about a process which sits and
waits for the database calls to finish before moving on to anything else.
Fighting stops. Zone resets stop. Processing new commands stop.  Text
output stops.  Everything stops while the database is performing it's
thing.  On an individual basis, this is fine, and if your database is
small and your computer large (ram + processor) you won't have any
problems.  On the other hand, if you have many people causing many calls
to a large (player, obj, world, mob, everything) database, potentially on
a system where you're vying for resources with other muds, or maybe even
the latest compile.. well.. it's bad.

        I know of at least one mud which has a huge world-map room system
comprised of over a million rooms, and that had to be threaded inorder to
allow for concurrent player and database activity.

> Running in this thought, does anyone have some db accessing code for C?
> All ive used is VB, perl, cgi, and ASP.  If you do, feel free to email it
> to me..:)
>

        Actually, if you're interested, there's whole tutorials on this
subject online if you search for it.  Depending on the database type, the
c code does tend to change a bit.

                                                PjD


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



This archive was generated by hypermail 2b30 : 04/11/01 PDT