[MUD-Dev] Re: DevMUD: Inheritable modules

James Wilson jwilson at rochester.rr.com
Fri Oct 30 18:50:22 CET 1998


On Fri, 30 Oct 1998, Adam J. Thornton wrote:
>I very much like the idea of doing the core of the server in ANSI C with
>POSIX functions, and implementing (as a module, of course) an OO scripting
>langage for actual world development on top of it.
>
>That's mostly because I understand C a lot better than I do C++; this is
>basically a personal aesthetic judgment on my part.  However, I think the
>core will tend to be smaller, cleaner, and easier to read if we stick with
>C.

certainly more portable. I have had a devil of a time with different C++
compilers' disagreements on such basic things as the return type of 
foo ? bar : baz. Oops - did I just say something in favor of a kernel in C? ;)

[what goes into the core snipped]

>I think there ought to be a one-to-one thread-to-connection mapping (there
>may of course be non-connection oriented threads going on, but each
>connection presumably requires its own thread, unless we want to make the
>I/O model nonblocking, which I think will get unwieldy for large numbers of
>players).  Also message queues of some sort to handle the data that each
>connection is transporting.

async i/o and thread pools scale much better than thread-per-connection,
as I understand it.

>So basically the core (in my idea of it) would not do much except handle
>connections, broker them, and multiplex/demultiplex the data going through
>them.  This is going to be kernel-like, so it's not really that important
>to be able to dynamically load it or unload it--I can't imagine a MUD that
>did not provide these services.  And I think this bottom layer would be a
>couple thousand lines of C: quite small.

yes, this much is straightforward. It's the module abstraction that seems to
be problematic.

James




More information about the mud-dev-archive mailing list