[MUD-Dev] Modular Design Issues RFC

Ryan Rhodes ryanshaerhodes at hotmail.com
Thu Feb 15 13:16:33 CET 2001


J C Lawrence wrote:

>
> > This 'player' thread has it's own infinite loop and from it parses
> > the players input, creates events, and executes them, thus
> > simulating time for the player.  The problems this would seem to
> > create, in terms of data synchronization, would seem enormous.
>
> This depends on your locking model.  Fine grained sychronous locking
> with such an approach could indeed easily be be nightmarish (and yet
> is the approach of many commercial OSes such as Solaris, IRIX,
> HP-UX, and even Windows NT due to the the performance/latency
> benefits).  More abstracted locking patterns, such as the C&C model
> I've adopted don't present such problems, and have the side benefit
> of side stepping the deadlock problem entirely.
>

I've basically sidestepped the locking problems in my design as well rather
than deal with it in full.  I've seen alot of references to this C & C
model.  Is it yours?  Sounds like something I may have studied in school.
Could you point me to a reference?



>
> I can't comment on the Java specifics of this model (I tend to think
> of Java as Broken As Designed (BAD)).  The approach I ve taken is to
> do the compile OOB from the normal player/server loop, and then lock
> the main loop only while the new object/function heirarchy is being
> instantiated.  Thus from the player's perception there is just a
> brief pause (usually unnoticable and with better snapshotting
> support in my DB it would be entirely unnoticable) while the game
> universe /shifts/ in some manner about them.
>

Yes, this seems the better of the three solutions, but it certainly pisses
me off.  After playing Diku muds for a long time and experiencing that
noticable tick lag, thinking it was all some complex algorythms slowing it
down it suddenly dawned on me that the majority of the lag must be from
pfile saves.  I mean its a text game, how could it lag on a pentium 700 for
any amount of time.  So it sort of pisses me off to spend all this time
developing a competely blocking free server only to have to come back and
make it lock for these few special cases...... anyway


Although it doesn't really matter, I'm thinking at the moment I'm going to
run it from an NT or 2000 machine.  Could anyone out there tell me which
JVM's implement threads as lightweight and which as hardwieght.  When It's
all said and done are my connection threads even going to be able to make
use of a multiprocessor machine.  Of the JVM's that can actually make use of
an SMP machine, does anyone know which accomplish it with the least
resources?

As always, burning the midnight oil,
        Ryan Rhodes

                    woops.. I guess thats the morning oil (he says noticing
the clock)


_______________________________________________
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