1999Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: RE: [MUD&#45;Dev] Sockets -->
<!--X-From-R13: Quevf Uenl <ptNnzv&#45;pt.UenlEntr.Sqzbagba.OP.QO> -->
<!--X-Date: Wed, 12 May 1999 15:27:01 &#45;0700 -->
<!--X-Message-Id: 199905121345.HAA03052@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, RE: [MUD-Dev] Sockets</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">
</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="msg00219.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00223.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00224.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00231.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00220">Author</A>
&nbsp;|&nbsp;<A HREF="#00220">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00220">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>RE: [MUD-Dev] Sockets</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>: RE: [MUD-Dev] Sockets</LI>
<LI><em>From</em>: Chris Gray &lt;<A HREF="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</A>&gt;</LI>
<LI><em>Date</em>: Wed, 12 May 1999 07:45:56 -0600</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>
[Jon A. Lambert:]

&gt; The common select/poll loop for non-blocking sockets that processes 
&gt; incoming, exceptions, reads, writes, and other mud processes is not
&gt; very efficient.  Firstly setting up the parameters to select and checking 
&gt; the FD_SETs involved alone is probably higher overhead than threading.
&gt; Secondly if the poll time is too short you end up burning processor 
&gt; cycles in the poll loop for no good reason.  And if the time is to long
&gt; you end up sleeping while your mud could be processing ripe events that
&gt; are issued from other functions in the mud (assuming that not all your 
&gt; events are initiated immediately for user input).   Yes, some good 
&gt; implementations attempt to dynamically adjust the polling time depending 
&gt; on how active the server is/was.  Still there is enough overhead here
&gt; to more than compensate for the overhead incurred through thread locks.

Why do you assume that a non-threaded MUD that is using poll/select
will actually be doing polling? There have been lots of techniques
discussed, none of which do actual polling. I don't recall any of the
dev-mud versions using polling (I'm quite sure mine doesn't). The
name 'poll' can be quite misleading. Semantically it is very close to
the WIN32 WaitForMultipleObjects - it wakes up when any of the fd's
is active, or when the time limit expires. If the time limit is set
based on needed MUD events, then there is no polling.

--
Don't design inefficiency in - it'll happen in the implementation.

Chris Gray     cg#ami-cg,GraySage.Edmonton.AB.CA
               <A  HREF="http://www.GraySage.Edmonton.AB.CA/cg/">http://www.GraySage.Edmonton.AB.CA/cg/</A>


_______________________________________________
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>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00219.html">Re: [MUD-Dev] Sockets</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00223.html">RE: [MUD-Dev] Sockets</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00224.html">RE: [MUD-Dev] Sockets</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00231.html">RE: [MUD-Dev] Sockets</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00220"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00220"><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] Sockets</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00247" HREF="msg00247.html">RE: [MUD-Dev] Sockets</A></strong>, 
Nicholas Lee <a href="mailto:N.J.Lee#statslab,cam.ac.uk">N.J.Lee#statslab,cam.ac.uk</a>, Fri 14 May 1999, 08:24 GMT
<UL>
<LI><strong><A NAME="00268" HREF="msg00268.html">RE: [MUD-Dev] Sockets</A></strong>, 
Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Sun 16 May 1999, 07:56 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00296" HREF="msg00296.html">RE: [MUD-Dev] Sockets</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Tue 18 May 1999, 06:42 GMT
</LI>
</ul>
<LI><strong><A NAME="00224" HREF="msg00224.html">RE: [MUD-Dev] Sockets</A></strong>, 
Daniel Garcia <a href="mailto:dgarcia#hollyfeld,org">dgarcia#hollyfeld,org</a>, Wed 12 May 1999, 22:36 GMT
</LI>
</ul>
</ul>
<LI><strong><A NAME="00220" HREF="msg00220.html">RE: [MUD-Dev] Sockets</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 12 May 1999, 22:27 GMT
</LI>
<LI><strong><A NAME="00231" HREF="msg00231.html">RE: [MUD-Dev] Sockets</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Fri 14 May 1999, 07:34 GMT
</LI>
<LI><strong><A NAME="00242" HREF="msg00242.html">RE: [MUD-Dev] Sockets</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Fri 14 May 1999, 08:15 GMT
</LI>
<LI><strong><A NAME="00245" HREF="msg00245.html">RE: [MUD-Dev] Sockets</A></strong>, 
Cynbe ru Taren <a href="mailto:cynbe#muq,org">cynbe#muq,org</a>, Fri 14 May 1999, 08:20 GMT
<UL>
<LI><strong><A NAME="00253" HREF="msg00253.html">RE: [MUD-Dev] Sockets</A></strong>, 
Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Sat 15 May 1999, 09:31 GMT
</LI>
</UL>
</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>