[MUD-Dev] Data Storage and MFC Questions
Adam Martin
amsm2 at cam.ac.uk
Mon Mar 12 02:09:48 CET 2001
<EdNote: New text moved below quote>
----- Original Message -----
From: "Ben Chambers" <bjchambers at phoenixdsl.com>
To: <mud-dev at kanga.nu>
Sent: Saturday, March 10, 2001 8:19 PM
Subject: [MUD-Dev] Data Storage and MFC Questions
> What is the best way of storing the data for a MUD. I know that the
> most common is probably arrays or hash tables. Hash Tables, from
> what I understand are arrays that have a faster lookup because of
> the hash function. Which one do you use, and why? Also, has anyone
> ever tried using MFC to write a MUD server? For example, I have
> found the MFC Map, which is basically a wrapping of a hash table, as
> having a good chance for usage in data storage. You write a
> subroutine as part of the class describing the hash function for a
> specific type of data. Then you just add data by index and value.
> And you can reference by index, or delete by index. It is a very
> easy way of using a hash table. MFC also has prospects in other
> aspects of MUD Design. It allows for the simplification of many
> processes, including dynamic object creation.
I would *very* strongly advise you go and learn about the science of
data structures before you even think about which one you might use,
and for what. Otherwise you will probably get a horrible shock at some
point when you discover you are doing (extreme but I've-seen-it-happen
example) add operations with O( n^7 ) execution time. Basically this
means that your MUD works really well when you test it with 20 of your
friends, and then when 30 people try to use it grinds to a halt,
leaving you wondering why only a factor of 1.5 times as many users was
enough to slow the system down by a factor of 20. (And until the big-O
notation means something to you, you're in danger of making such
mistakes).
If you were using Java (which you aren't, but for other people's
benefit:) a starting point would be
http://www.java.sun.com/docs/books/tutorial/collections/interfaces/index.html
although even the links from that page don't provide quite enough
information.
Otherwise, do a search for "data structures" and "time complexity",
and possibly even "big o notation" in your favourite search engine.
Adam M
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list