[MUD-Dev] Multi-threaded mud server.
Ross Nicoll
rnicoll at lostics.demon.co.uk
Mon May 17 18:54:42 CEST 1999
On Mon, 17 May 1999, Caliban Tiresias Darklock wrote:
> >> If I'm correct in this understanding, and please correct me if I'm not,
> >> then the "proper" way to implement such a scheme would be for each thread
> >> to accomplish specific *tasks* instead of handling specific *objects*.
> >An interesting idea, but I think it would require too much inter-process
> >communication, and in particular may not load balance very well...
> If amount of IPC is a problem, why not stay monolithic and not have any? ;)
*shuffles* this turned out to be me paying too much attention to the comp
sci department at my university, sorry :)
Sat down and thought about it some more, and it may work very well. Making
sure the right thread has the right user could be tricky, but certainly
not impossible. Also, if several people lurk in the same place, and talk,
then they should be all in the same thread.
I'm still not quite sure how to handle modification of the database tree
by more than one thread, though, without having one thread handle all
database access operations; addition/deletion of objects by a single
thread wouldn't be a problem, because they're quite rare operations, but
if all object lookups involved context switch... *shudder* it wouldn't be
pretty.
> Or, the short form of the above: How do you balance the load before you
> measure it?
By monitoring average load on each thread, and assigning players to the
thread with the lowest average load. It isn't a perfect system, but...
--
_ __ __ __
/_) / / (_ (__
/\ /_/ __) /
______________/
_______________________________________________
MUD-Dev maillist - MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list