msg00085.html

2000Q1/msg00085.html · 8.1 KB

From the archive 2000Q1.zip

Download the archive   « Back to the archive contents

<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Question about multithreaded servers -->
<!--X-From-R13: Tnovna Zrzxr <yrzxrsNrkrpcp.pbz> -->
<!--X-Date: Fri, 14 Jan 2000 10:38:58 &#45;0800 -->
<!--X-Message-Id: Pine.SOL.4.10.10001141100200.5830&#45;100000#earth,execpc.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: E127woF&#45;0003wi&#45;00#kanga,nu -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Question about multithreaded servers</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:lemkef#execpc,com">
</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>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00084.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00086.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00280.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00087.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00085">Author</A>
&nbsp;|&nbsp;<A HREF="#00085">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00085">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Question about multithreaded servers</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] Question about multithreaded servers</LI>
<LI><em>From</em>: Fabian Lemke &lt;<A HREF="mailto:lemkef#execpc,com">lemkef#execpc,com</A>&gt;</LI>
<LI><em>Date</em>: Fri, 14 Jan 2000 11:11:56 -0600 (CST)</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>
Hello, First time post, but long time lurker :)
I'm mostly a hobbiest programmer, and like to tinker with various thing.
MUD desgin has facinated me for a very long time now.  I'm having a bit of
a problem though I'm hoping will be fairly simple to solve..

I'm in the midst of redesigning a more simplistic server I've been working
on - it's nothing fancy, and basically something to play with - and
decided to go multi-threaded so that there won't be blocking and polling
and such.  The design I have so far I think will work wonderful, except
for one problem.. 

The server is going to be very script-based, and I have a behavior/effect
model in mind that tests out great in theory, but the script layering it
requires is what's causing the problem:
Since most of the time, players will only be interacting with others in
the same area, I've decided to do one thread per area (area consisting of
a collection of rooms).  Also one thread for client for rendering what
they see based on game events, and handling input and output to the
sockets.  The problem is that the Area threads will be responsible for
telling the objects to process scripts, and I'll be needing commands to
get access to objects that may be in other area threads - usually not a
problem if locking is all proper - but I'm worried about deadlocks because
I want objects locked during the whole script so nothing can be changed on
me.  Since object scripts can get out-of-area objects to play with, they
have to be locked for the rest of the script.  If two objects (not in the
same area) lock themselves to run a script, and then each's script
attempts to secure the other.....

The only solution I can think of is to have a seperate thread for
executing scripts, but 95% of the time scripts won't need to access
out-of-area objects.

Any ideas how this can be solved?  I'm somewhat new to multi-threading,
but am pretty sure I have a solid grasp on it all, but I've little design
experience in it.

Thanks a heap :)

Fabian





_______________________________________________
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="00241" HREF="msg00241.html">Re: [MUD-Dev] Question about multithreaded servers</A></strong>
<ul compact><li><em>From:</em> J C Lawrence &lt;claw#kanga,nu&gt;</li></ul>
<li><strong><A NAME="00087" HREF="msg00087.html">Re: [MUD-Dev] Question about multithreaded servers</A></strong>
<ul compact><li><em>From:</em> "AR Schleicher" &lt;ars#iag,net&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00084.html">RE: player politics (was RE: [MUD-Dev] An introduction...)</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00086.html">[MUD-Dev] Community Relations</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00280.html">Re: [MUD-Dev] Community Relations</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00087.html">Re: [MUD-Dev] Question about multithreaded servers</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00085"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00085"><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>Re: [MUD-Dev] Community Relations</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00265" HREF="msg00265.html">Re: [MUD-Dev] Community Relations</A></strong>, 
Lovecraft <a href="mailto:dave#darkages,com">dave#darkages,com</a>, Thu 03 Feb 2000, 07:43 GMT
</LI>
<LI><strong><A NAME="00266" HREF="msg00266.html">RE: [MUD-Dev] Community Relations</A></strong>, 
Geoffrey A. MacDougall <a href="mailto:geoffrey#poptronik,com">geoffrey#poptronik,com</a>, Thu 03 Feb 2000, 17:18 GMT
<UL>
<LI><strong><A NAME="00267" HREF="msg00267.html">RE: [MUD-Dev] Community Relations</A></strong>, 
Matthew Mihaly <a href="mailto:diablo#best,com">diablo#best,com</a>, Thu 03 Feb 2000, 20:58 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00280" HREF="msg00280.html">Re: [MUD-Dev] Community Relations</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Tue 08 Feb 2000, 19:07 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="00085" HREF="msg00085.html">[MUD-Dev] Question about multithreaded servers</A></strong>, 
Fabian Lemke <a href="mailto:lemkef#execpc,com">lemkef#execpc,com</a>, Fri 14 Jan 2000, 18:38 GMT
<UL>
<LI><strong><A NAME="00087" HREF="msg00087.html">Re: [MUD-Dev] Question about multithreaded servers</A></strong>, 
AR Schleicher <a href="mailto:ars#iag,net">ars#iag,net</a>, Fri 14 Jan 2000, 21:48 GMT
</LI>
<LI><strong><A NAME="00241" HREF="msg00241.html">Re: [MUD-Dev] Question about multithreaded servers</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Sun 30 Jan 2000, 19:22 GMT
<UL>
<LI><strong><A NAME="00253" HREF="msg00253.html">datagram protocol design theory? (Re: [MUD-Dev] Question about multithreaded servers)</A></strong>, 
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Mon 31 Jan 2000, 23:35 GMT
</LI>
</UL>
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00088" HREF="msg00088.html">Re: [MUD-Dev] Question about multithreaded servers</A></strong>, 
Nick Shaffner <a href="mailto:nicks#3drealms,com">nicks#3drealms,com</a>, Sat 15 Jan 2000, 00:30 GMT
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>

Site Stats

Snippets: 1791
Codebases: 571