[MUD-Dev] Re: TECH: Distributed Muds

Caliban Tiresias Darklock caliban at darklock.com
Thu Apr 26 21:18:11 CEST 2001


On Thu, 26 Apr 2001 20:31:37 -0700, J C Lawrence <claw at 2wire.com> wrote:

> I've never liked the base concept of a select() looping process that
> tried to do real work between select() calls.  It can work to be
> sure, but it has always smelled of playing with fire.

I've always seen it as sort of an "every other MUD does this, it must
be a good idea" solution. I think most people who start writing a MUD
server concern themselves first and foremost with making a good *MUD*
instead of with making a good DB core, a good object model, and a good
communications link. Those who do try to get into those areas seem to
go with the object model and the DB more than the communications.

Don't mention this communications model on any kind of network
programming forum, though. You'll never hear the end of how stupid you
are. ;)

> I prefer having a thread dedicated to socket IO, pulling in and
> buffering the IO as received, and then handling compleated blocks
> off to one or more queues (depends on whether you do pre-sorts) for
> the other game systems to pick up and process appropriately.  There
> are several advantages, not the least of which is that you decouple
> your command/entry model from your processing model.

That's pretty much what I consider the "ideal" model, myself. I don't
do it, because I'm still not entirely comfortable with threads, but
I'm working on getting there. Currently, I still use select() for I/O,
just because... well, every other MUD uses it. :P

_______________________________________________
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