[MUD-Dev] New to MUD Dev, need friendly advice!
Zach Collins {Siege}
zcollins at seidata.com
Sun Apr 27 03:19:41 CEST 2003
On Fri, 25 Apr 2003, Jacob Cord wrote:
> On Wed, 2003-04-16 at 12:04, Lance Rotten wrote:
>> 1. Connections - What is the best method for accepting multiple
>> connections? Ive heard individual threads are an awful idea,
>> and
> I'm no pro in high availability here, but as I understand
> (primarily Linux) sockets, if you are going for a real high number
> of connections, you can either fork() child processes to handle
There are three options. Twisted (http://www.twistedmatrix.com/)
uses a single process. Many web servers fork new processes to
handle incoming requests. Threads are another option. Each has
benefits and drawbacks.
> I wrote a connection driver recently just using select() and
> threads (and semaphores and mutexes), and it seems to run great,
> although I've never had 1000 connections to it (more like 20). I
> block when there is no socket activity, but timeout every 2
> seconds (my "heartbeat" time) and check for non-socket work that
> needs to be done. Maybe not the most efficient way to do it, but
> for a smaller application it runs great.
The MU* server I'm developing has a single thread dedicated to
handling sockets, using a select() and handle loop, giving me the
benefits of both single-process and threaded implementation.
>> 2. Any advice for someone completely new to building a MUD
>> Engine would be great. Good tutorials, groups etc. I am using
>> this as a
I would suggest familiarizing yourself with how to build (and
possibly program) within several different types of mud servers.
You don't have to be great at it, but I've found that knowing how to
build inside the mud helps you to understand some of the design of
the mud's internals, as well as concepts like inheritance and the
importance of navigable code. ("You are in a maze of twisty little
passages, all alike.")
Also, as mentioned before, do some back-reading within the archives
on kanga.nu to see if some of your current questions, spoken or
unspoke, have been asked before.
--
Zach Collins
_______________________________________________
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