Advanced Topic - Doing it differently.

Christopher Bunting cbunting99 at gmail.com
Tue Apr 5 14:16:03 New Zealand Standard Time 2005


>I also think you may have missed
>the mark a bit on why so many muds are moving toward sql database backends.
>Sql database backends add so much more flexibility than a flat file system.

Hello,
 I could be off but at the same time, while there is pro's and con's
with flat file databases, the same goes for mysql as well.. It's not
perfect. If you find that area file formats are to hard, then why not
use Berkely DB or one of the many other text databases? Php can access
text db's as well and they can work just as good without the overhead
too.. Another topic that would moreless be based on personal opinion I
guess. I just hope that anyone new to mysql does backups on a much
more regular basis.. Once the db get's corrupted.. The mud is toast
without a backup.

 But I'm a bit confused, 
 
 >For instance try to write a php script that reads your log files 
 
 If you can implement mysql into the mud, I would think it'd be a snap
tp write the simple lines of c code to parse the output of the log
file and output it to the web? Heck, you could just have the mud
output each log each day directly to a formatted html page.. There's
been a mud log program out for years that will read it in and generate
html. Doxygen can read mud help files and output them via html for the
web.. So can help2html. Everything and every reason I've heard for
using mysql can be done without it..

 Write a simle web server built right into the mud to show the output
of the exported html from logs, helps or whatever..
 
 Example:

 void server(void)
{
    int sock = sockopen(NULL, 8100);
    unsigned char info[6];
    if (sock == -1) {
        perror("server.sockopen");
        exit(1);
    }
    sockinfo(sock, info);
    printf("Server socket open on host %d.%d.%d.%d, port %d\n",
           info[0], info[1], info[2], info[3], info[4] * 256 + info[5]);
    socklisten(sock, handler);
}

 Maybe I really am missing the point.. As I said, all the other
options just make more sense to use over mysql.. But that is only my
opinion so if it works for you.. Thats awesome..

But anyway, Here is what a Professional Game programmer had to say.
This is about mmorpgs but it also tells about the pro's and con's of
db usage..

http://www.devmaster.net/articles/building-mmorpg/

Thanks for the reply,
Chris
-- 
ROM mailing list
ROM at rom.org
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom


More information about the MUD-Dev mailing list