[MUD-Dev] Re: TECH: Distributed Muds

Kwon Ekstrom justice at softhome.net
Mon Apr 30 08:21:48 CEST 2001


----- Original Message -----
From: "J C Lawrence" <claw at 2wire.com>

> I've never liked the base concept of a select() looping process that
> tried to do real work between select() calls.

> I prefer having a thread dedicated to socket IO, pulling in and
> buffering the IO as received, and then handling compleated blocks

I'm writing my game in java, and am using a sort of hybrid version of
the Diku style polling system with a 1/4 second sleep interval.

I'm using threads to handle player input (1/4s pulses here too, but
it'll create new connection handler objects with their own thread to
handle connections if the tolerance is breached).  Additionally, I'm
using threads to run the handlers, each handler object runs with the
1/4s pulse, but can be given specific handlers to run as needed.

I intend to force the game into a sleep mode if there aren't any
players on, which will close out all the threads except the one
listening for new connections.  It's still early in the design phase,
but my goal is to release it as a server designed around expansion,
with nothing directly game related in the core server.

Also, like Diku, I compute the time difference to keep sleep periods
as uniform as possible.  I intend to write a thread tender that can
interrupt threads that take too long.

-- Kwon Ekstrom

_______________________________________________
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