<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: MUD Coding in general. --> <!--X-From-R13: "Quevf Znjerapr" <pynjerapNkfie1.phc.uc.pbz> --> <!--X-Date: Thu, 21 Nov 1996 19:54:14 +0100 --> <!--X-Message-Id: 9611211105.ZM8483#xsvr1,cup.hp.com --> <!--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 Coding in general.</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:clawrenc#xsvr1,cup.hp.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> [ <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="msg00055.html">Previous</a> | <a href="msg00057.html">Next</a> ] Thread: [ <a href="msg00057.html">Previous</a> | <a href="msg00055.html">Next</a> ] Index: [ <A HREF="author.html#00056">Author</A> | <A HREF="#00056">Date</A> | <A HREF="thread.html#00056">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>Re: MUD Coding in general.</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <A HREF="mailto:mud#bug,belgonet.be">mud#bug,belgonet.be</A></LI> <LI><em>Subject</em>: Re: MUD Coding in general.</LI> <LI><em>From</em>: "Chris Lawrence" <<A HREF="mailto:clawrenc#xsvr1,cup.hp.com">clawrenc#xsvr1,cup.hp.com</A>></LI> <LI><em>Date</em>: Thu, 21 Nov 1996 11:05:44 -0800</LI> <LI><em>Newsgroups</em>: rec.games.mud.admin</LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> Nathan Fenenga Yospe (yospe#Hawaii,Edu) wrote: : Thread Player Socket: : Start : Wait for Connect : Pick up : Spawn new thread for next connect : loop : when input, load to buffer : when output, flush (provision for delayed flush here) : end : (This thread sends message and terminates when the main process dies) Have you looked at using an asynchronous model for handling your connection threads? Allocating one thread per connection can get expensive when the total number of connections gets large (say 500 simultaneous players). I have a thread pool here that as a unit manages the IO from a much larger set of connections. Essentially all the threads block until there is IO to serve. Threads are assigned to IO on a first-available basis, and then de-assigned as soon as the IO is compleated. This allows (in very crude tests) a rough ratio of 1:20 threads per active socket while still maintaining good response rates (you could also put in a balancing algorithm which grows/shrinks the thread pool in response to loading). -- J C Lawrence Internet: coder#ibm,net ---------------(*) Internet: clawrenc#cup,hp.com ...Honorary Member Clan McFUD -- Teamer's Avenging Monolith... </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="msg00055.html">Re: MUD Design Digest V1 #55</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00057.html">Re: MUD Design Digest V1 #47</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00057.html">Re: MUD Design Digest V1 #47</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00055.html">Re: MUD Design Digest V1 #55</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00056"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00056"><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: command parsing</STRONG>, <EM>(continued)</EM> <ul compact> <LI><strong><A NAME="00132" HREF="msg00132.html">Re: command parsing</A></strong>, claw <a href="mailto:claw#null,net">claw#null,net</a>, Tue 18 Mar 1997, 02:11 GMT </LI> </ul> </LI> <LI><strong><A NAME="00058" HREF="msg00058.html">Re: MUD Design Digest V1 #52</A></strong>, Chris Lawrence <a href="mailto:clawrenc#xsvr1,cup.hp.com">clawrenc#xsvr1,cup.hp.com</a>, Fri 22 Nov 1996, 21:34 GMT <LI><strong><A NAME="00064" HREF="msg00064.html">Re: MUD Design Digest V1 #49</A></strong>, Chris Lawrence <a href="mailto:clawrenc#xsvr1,cup.hp.com">clawrenc#xsvr1,cup.hp.com</a>, Fri 22 Nov 1996, 21:22 GMT <LI><strong><A NAME="00057" HREF="msg00057.html">Re: MUD Design Digest V1 #47</A></strong>, Chris Lawrence <a href="mailto:clawrenc#xsvr1,cup.hp.com">clawrenc#xsvr1,cup.hp.com</a>, Fri 22 Nov 1996, 21:20 GMT <LI><strong><A NAME="00056" HREF="msg00056.html">Re: MUD Coding in general.</A></strong>, Chris Lawrence <a href="mailto:clawrenc#xsvr1,cup.hp.com">clawrenc#xsvr1,cup.hp.com</a>, Thu 21 Nov 1996, 18:54 GMT <LI><strong><A NAME="00055" HREF="msg00055.html">Re: MUD Design Digest V1 #55</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,graysage.edmonton.ab.ca">cg#ami-cg,graysage.edmonton.ab.ca</a>, Tue 19 Nov 1996, 06:50 GMT <UL> <li><Possible follow-up(s)><br> <LI><strong><A NAME="00063" HREF="msg00063.html">Re: MUD Design Digest V1 #55</A></strong>, Chris Lawrence <a href="mailto:clawrenc#xsvr1,cup.hp.com">clawrenc#xsvr1,cup.hp.com</a>, Mon 02 Dec 1996, 19:05 GMT </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>