1999Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Sockets -->
<!--X-From-R13: "Xba O. Znzoreg" <wyflfvapNvk.argpbz.pbz> -->
<!--X-Date: Mon, 3 May 1999 22:47:14 &#45;0700 -->
<!--X-Message-Id: 199905040247.VAA18428@dfw&#45;ix13.ix.netcom.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 000901be8be5$4d9785a0$11cb9cd1@k6 -->
<!--X-Reference: 19990422104125.A13766#thelonious,new.ox.ac.uk -->
<!--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:jlsysinc#ix,netcom.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="msg00130.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00132.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00099.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00164.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00131">Author</A>
&nbsp;|&nbsp;<A HREF="#00131">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00131">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>: "Jon A. Lambert" &lt;<A HREF="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</A>&gt;</LI>
<LI><em>Date</em>: Mon, 3 May 1999 22:46:59 -5</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>
On 22 Apr 99,, Jo Dillon wrote:
&gt; Quzah [softhome] (quzah#softhome,net) spake thusly:
&gt; &gt; What is the main difference between and benifit of using:
&gt; &gt; 
&gt; &gt; (1) asynchronous notification
&gt; &gt;     &lt;versus&gt;
&gt; &gt; (2) versus non-blocking
&gt; &gt;     &lt;versus&gt;
&gt; &gt; (3) using select
&gt; 
&gt;   Actually, there is a (4) - blocking i/o within threads. This is good
&gt; for very complex interactions with a client (since you don't need a state
&gt; machine or anything icky like that) but has portability and scalability
&gt; problems (worse than select()? I'd be interested to know, at least as
&gt; regards Linux...) It's also quite hard to write a reliable threaded
&gt; program since problems can be non-reproducible.
&gt; 

There is also (5) Overlapped I/O which is only available on NT 4.0 or higher 
and a bit difficult to program.  It's conceptually similar to readv() and 
writev() on BSD.  Asynchronous sockets are available also on all windows 
platforms, and are the easiest to program and most code readable.  But they 
have a bit higher overhead because they must use windowed messaging.  They are 
the only alternative to non-blocking on Win16 but I don't suppose anyone's 
interested in that. ;)  

Option 4 that Jo gave above is highly preferred over non-blocking sockets on 
Win32 servers.  They really "should" be the preferable performance choice on 
Unix/BSD systems also.  I don't know why more muds aren't using them.  I know
it's pretty much standard fare for the better FTP and HTTP servers.       

Ranking the options from best to worst from a performance standpoint 
(Note- Win32 only):

1. Overlapped I/O
2. Blocking - w/threads
3. Asynchronous sockets
4. Non-blocking 
5. Blocking - w/o threads

And ranking them by easiest to program and understand:

1. Blocking - w/o threads
2. Asynchronous
3. Non-blocking
4. Blocking - w/threads
5. Overlapped I/O

FYI ... YMMV. ;)


--
--*     Jon A. Lambert - TychoMUD       Email:jlsysinc#,ix.netcom.com      *--
--*     Mud Server Developer's Page &lt;<A  HREF="http://pw1.netcom.com/~jlsysinc">http://pw1.netcom.com/~jlsysinc</A>&gt;      *--
--* I am the Dragon of Grindly Grund, but my lunches aren't very much fun, *--
--* For I like my damsels medium rare, And they always come out well done. *--


_______________________________________________
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-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00094" HREF="msg00094.html">[MUD-Dev] Sockets</A></STRONG>
<UL><LI><EM>From:</EM> "Quzah [softhome]" &lt;quzah#softhome,net&gt;</LI></UL></LI>
<LI><STRONG><A NAME="00099" HREF="msg00099.html">Re: [MUD-Dev] Sockets</A></STRONG>
<UL><LI><EM>From:</EM> Jo Dillon &lt;emily#thelonious,new.ox.ac.uk&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00130.html">Re: [MUD-Dev] Interesting dilemma</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00132.html">Re: [MUD-Dev] Custom Server Roll Call?</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00099.html">Re: [MUD-Dev] Sockets</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00164.html">RE: [MUD-Dev] Sockets</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00131"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00131"><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="00094" HREF="msg00094.html">[MUD-Dev] Sockets</A></strong>, 
Quzah [softhome] <a href="mailto:quzah#softhome,net">quzah#softhome,net</a>, Wed 21 Apr 1999, 05:29 GMT
<UL>
<LI><strong><A NAME="00098" HREF="msg00098.html">Re: [MUD-Dev] Sockets</A></strong>, 
Alex Stewart <a href="mailto:riche#crl,com">riche#crl,com</a>, Thu 22 Apr 1999, 05:37 GMT
<UL>
<LI><strong><A NAME="00100" HREF="msg00100.html">Re: [MUD-Dev] Sockets</A></strong>, 
Quzah [softhome] <a href="mailto:quzah#softhome,net">quzah#softhome,net</a>, Fri 23 Apr 1999, 07:14 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00099" HREF="msg00099.html">Re: [MUD-Dev] Sockets</A></strong>, 
Jo Dillon <a href="mailto:emily#thelonious,new.ox.ac.uk">emily#thelonious,new.ox.ac.uk</a>, Fri 23 Apr 1999, 07:06 GMT
<UL>
<LI><strong><A NAME="00131" HREF="msg00131.html">Re: [MUD-Dev] Sockets</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Tue 04 May 1999, 05:47 GMT
</LI>
</UL>
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00164" HREF="msg00164.html">RE: [MUD-Dev] Sockets</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Thu 06 May 1999, 15:24 GMT
</LI>
<LI><strong><A NAME="00171" HREF="msg00171.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>, Sat 08 May 1999, 05:04 GMT
<UL>
<LI><strong><A NAME="00180" HREF="msg00180.html">RE: [MUD-Dev] Sockets</A></strong>, 
Petri Virkkula <a href="mailto:pvirkkul#iki,fi">pvirkkul#iki,fi</a>, Sat 08 May 1999, 18:37 GMT
</LI>
<LI><strong><A NAME="00205" HREF="msg00205.html">RE: [MUD-Dev] Sockets</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Tue 11 May 1999, 20:12 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>