1997Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: Ho hum (Sockets) -->
<!--X-From-R13: Zvat <Y.Z.Zb&#45;94Nfghqrag.yhg.np.hx> -->
<!--X-Date: from fabius.globecomm.net [207.51.48.6] by mx3.ibm.net id 861328236.85470&#45;1 Fri Apr 18 01:50:36 1997 -->
<!--X-Message-Id: Pine.SOL.3.95.970418025354.9608F&#45;100000@sun&#45;cc203 -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199704132356.XAA329273#out2,ibm.net -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: Ho hum (Sockets)</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:K.L.Lo-94#student,lut.ac.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>
[&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="msg00152.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00154.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00154.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00149.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00151">Author</A>
&nbsp;|&nbsp;<A HREF="#00151">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00151">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: Ho hum (Sockets)</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: Mud Dev Mailing List &lt;<A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A>&gt;</LI>
<LI><em>Subject</em>: Re: Ho hum (Sockets)</LI>
<LI><em>From</em>: Ling &lt;<A HREF="mailto:K.L.Lo-94#student,lut.ac.uk">K.L.Lo-94#student,lut.ac.uk</A>&gt;</LI>
<LI><em>Date</em>: Fri, 18 Apr 1997 02:55:31 +0100 (BST)</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
Hidi!

I thought I'd tell you all what I found in my mailbox earlier in the year
It seems to answer my dilemma.  I think it's from ChrisL:

   One thread watches the master socket.  Spawn new connections.

   When IO is found, it is passed to an available thread (note, threads
   are not assigned to clients, threads sit in a pool/bag/heap/mess/cess
   pit). 

   If there is no available thread, a new thread is spawned.

   Every now and then, the socket threads are killed down to a base
   minimum should they exceed the users ratio significantly. 


Oki... now, I think I'm going to use the above model for input so I'll end
up with something like:

Master socket thread:
Watches master socket, spawns new connections, checks for input.  Passes
input to an available socket thread if it is a whole line and spawns a new
socket thread if there is not one available.

Socket threads:
Receives input and interprets it immediately.

Master output socket thread:
Same model for input.  No need to spawn new connection though. :)

Output socket threads:
Receives buffer and flushes it with the appropriate encoding (expansion
for support of any protocols handled here). 


Don't know where to place the code to check if there's too many socket
threads.  My feeling is that if there's too many, surely it shouldn't
matter as the extra threads sleep anyway.

  |				"With my naked eyes I saw the falling"
_O_O_  Ling - Freshwater fish	 rain coming down on."


</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="msg00152.html">Re: Issues from the digests and Wout's list</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00154.html">A Combat System (please critique!)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00154.html">A Combat System (please critique!)</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00149.html">Re: (fwd) A Mud Protocol (MUD Markup Language)</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00151"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00151"><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="00171" HREF="msg00171.html">Re: Your Message To mud-dev</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Mon 21 Apr 1997, 07:43 GMT
<LI><strong><A NAME="00166" HREF="msg00166.html">I'm back</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Mon 21 Apr 1997, 04:09 GMT
<LI><strong><A NAME="00156" HREF="msg00156.html">[MUD-DEV] Steward and other painful friends</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Fri 18 Apr 1997, 22:36 GMT
<LI><strong><A NAME="00154" HREF="msg00154.html">A Combat System (please critique!)</A></strong>, 
S001GMU <a href="mailto:S001GMU#nova,wright.edu">S001GMU#nova,wright.edu</a>, Fri 18 Apr 1997, 21:14 GMT
<LI><strong><A NAME="00151" HREF="msg00151.html">Re: Ho hum (Sockets)</A></strong>, 
Ling <a href="mailto:K.L.Lo-94#student,lut.ac.uk">K.L.Lo-94#student,lut.ac.uk</a>, Fri 18 Apr 1997, 08:50 GMT
<LI><strong><A NAME="00149" HREF="msg00149.html">Re: (fwd) A Mud Protocol (MUD Markup Language)</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Thu 17 Apr 1997, 12:16 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00352" HREF="msg00352.html">Re: (fwd) A Mud Protocol (MUD Markup Language)</A></strong>, 
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Sat 10 May 1997, 02:44 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00148" HREF="msg00148.html">r.g.m.* - worthwhile thread</A></strong>, 
Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Thu 17 Apr 1997, 04:27 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00160" HREF="msg00160.html">Re: r.g.m.* - worthwhile thread</A></strong>, 
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Sat 19 Apr 1997, 01:47 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>