msg00270.html
1999Q2/msg00270.html · 7.3 KB
From the archive 1999Q2.zip
Download the archive « Back to the archive contents
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD-Dev] Multi-threaded mud server. -->
<!--X-From-R13: Dbff @vpbyy <eavpbyyNybfgvpf.qrzba.pb.hx> -->
<!--X-Date: Sun, 16 May 1999 14:09:28 -0700 -->
<!--X-Message-Id: Pine.LNX.4.10.9905162033590.4142-100000@drpc-jrn.res.st-and.ac.uk -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Multi-threaded mud server.</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:rnicoll#lostics,demon.co.uk">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">
<font size="+4" color="#804040">
<strong><em>MUD-Dev<br>mailing list archive</em></strong>
</font>
<br>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
Date:
[ <a href="msg00269.html">Previous</a>
| <a href="msg00271.html">Next</a>
]
Thread:
[ <a href="msg00312.html">Previous</a>
| <a href="msg00273.html">Next</a>
]
Index:
[ <A HREF="author.html#00270">Author</A>
| <A HREF="#00270">Date</A>
| <A HREF="thread.html#00270">Thread</A>
]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Multi-threaded mud server.</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: MUD Development List <<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>></LI>
<LI><em>Subject</em>: [MUD-Dev] Multi-threaded mud server.</LI>
<LI><em>From</em>: Ross Nicoll <<A HREF="mailto:rnicoll#lostics,demon.co.uk">rnicoll#lostics,demon.co.uk</A>></LI>
<LI><em>Date</em>: Sun, 16 May 1999 20:42:02 +0000 (GMT)</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
A friend and I are trying to write a new mud server in C++, mostly as a
learning excercise. We would like to make it multi-threaded, and I've hit
a few problems/questions. The design is this:
The MUD creates as many threads as processors, and then allocates players
and computer characters in such a way that load on each processor should
be roughly equal. This should keep context switching to a minimum.
The database is a binary search tree of objects, where each object can
have various attributes set on it.
Now, the tricky bit is making sure that the database is not being modified
and read from at the same time (modifying the tree during a read could be
seriously bad), and also that any particular object is not being modified
and read from at the same time.
Semaphores were the original plan, but as I understand it, this would
require a new semaphore for each object. As we're looking at 10,000+
objects, that's a _lot_ of semaphores.
The only other idea I've had is making the original process act as a
database server, which the threads can send read/write requests to. It
isn't quite as tidy as semaphores, but might work better.
I'm wondering how everyone else does this?
_______________________________________________
MUD-Dev maillist - MUD-Dev#kanga,nu
<A HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>
</PRE>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00279" HREF="msg00279.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>
<ul compact><li><em>From:</em> "David Bennett" <ddt#discworld,imaginary.com></li></ul>
<li><strong><A NAME="00273" HREF="msg00273.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>
<ul compact><li><em>From:</em> Caliban Tiresias Darklock <caliban#darklock,com></li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00269.html">[MUD-Dev] Re[2]: [MUD-Dev] Sockets</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00271.html">Re: [MUD-Dev] Planes of existance</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00312.html">RE: [MUD-Dev] Noise: boys will be boys (was Re: [MUD-Dev] Multi-threaded mud server.)</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00273.html">Re: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00270"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00270"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><strong><A NAME="00317" HREF="msg00317.html">[MUD-Dev] Kanga.Nu has finally moved...</A></strong>,
claw <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Thu 20 May 1999, 06:50 GMT
<UL>
<li><Possible follow-up(s)><br>
<LI><strong><A NAME="00318" HREF="msg00318.html">[MUD-Dev] Kanga.Nu has finally moved...</A></strong>,
claw <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Thu 20 May 1999, 06:55 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00309" HREF="msg00309.html">Re: [MUD-Dev] Noise: boys will be boys (was Re: [MUD-Dev] Multi-threaded mud server.)</A></strong>,
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Thu 20 May 1999, 05:10 GMT
<UL>
<li><Possible follow-up(s)><br>
<LI><strong><A NAME="00312" HREF="msg00312.html">RE: [MUD-Dev] Noise: boys will be boys (was Re: [MUD-Dev] Multi-threaded mud server.)</A></strong>,
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Thu 20 May 1999, 05:13 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00270" HREF="msg00270.html">[MUD-Dev] Multi-threaded mud server.</A></strong>,
Ross Nicoll <a href="mailto:rnicoll#lostics,demon.co.uk">rnicoll#lostics,demon.co.uk</a>, Sun 16 May 1999, 21:09 GMT
<UL>
<LI><strong><A NAME="00273" HREF="msg00273.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>,
Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Mon 17 May 1999, 03:48 GMT
<UL>
<LI><strong><A NAME="00277" HREF="msg00277.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>,
Ross Nicoll <a href="mailto:rnicoll#lostics,demon.co.uk">rnicoll#lostics,demon.co.uk</a>, Mon 17 May 1999, 04:22 GMT
<UL>
<LI><strong><A NAME="00280" HREF="msg00280.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>,
Travis S. Casey <a href="mailto:efindel#io,com">efindel#io,com</a>, Mon 17 May 1999, 15:24 GMT
<UL>
<LI><strong><A NAME="00298" HREF="msg00298.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>,
Ola Fosheim Grøstad <a href="mailto:no#no,no">no#no,no</a>, Tue 18 May 1999, 06:44 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>
</ul>
<hr>
<center>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
</center>
<hr>
</body>
</html>