<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: So in an event-driven server, how do you ... --> <!--X-From-R13: pynjerapNkfie1.phc.uc.pbz --> <!--X-Date: from babe.globecomm.net [207.51.48.8] by mx3.ibm.net id 860794312.69454-1 Fri Apr 11 21:31:52 1997 --> <!--X-Message-Id: 199703101436.3728386.7@claw --> <!--X-Content-Type: text/plain --> <!--X-Reference: 199704071758.RAA543716#out2,ibm.net --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, Re: So in an event-driven server, how do you ...</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="msg00086.html">Previous</a> | <a href="msg00087.html">Next</a> ] Thread: [ <a href="msg00046.html">Previous</a> | <a href="msg00088.html">Next</a> ] Index: [ <A HREF="author.html#00090">Author</A> | <A HREF="#00090">Date</A> | <A HREF="thread.html#00090">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>Re: So in an event-driven server, how do you ...</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: Multiple Recipients of MUD Design Mailing List <<A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A>></LI> <LI><em>Subject</em>: Re: So in an event-driven server, how do you ...</LI> <LI><em>From</em>: <A HREF="mailto:clawrenc#xsvr1,cup.hp.com">clawrenc#xsvr1,cup.hp.com</A></LI> <LI><em>Date</em>: Thu, 10 Apr 97 14:29:07 -0700</LI> <LI><em>Reply-To</em>: <A HREF="mailto:claw#null,net">claw#null,net</A></LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> In <199704071758.RAA543716#out2,ibm.net>, on 04/07/97 at 01:39 PM, Michael Hohensee <michael#sparta,mainstream.net> said: >It looks like you guys hate polling. (Not that I blame you, I don't >really like it myself. :) But if you've got a system that just sits >until the next "ripening", how do you do your IO with players? Do >you use an endless loop to poll the connections? Or do you use the >SIGIO signal? Rather than re-state, from an earlier post of mine: --<cut>-- > I am particularly interested in how your pool of threads manages socket > connections. Are these threads dynamically created to manage connections? > That is, do you n+1 threads managing your connections, where n is active > connections plus one to handle connection requests on the master socket? > Are sockets blocked or do you use some other method of activating threads? This is really really crude, as its very long time since I looked at this code: One thread watches the master socket and spawns connection sockets from there as they come in. The child sockets then go into a pool (actually I think its a bag?) with a monitoring thread. Any IO to or from a socket is then assigned on a first available basis to a thread from a waiting pool of IO threads. Should an IO request come in which does not have a waiting thread ready to execute it, a new thread is created to process the IO. Should the number of IO threads significantly exceed the number of open sockets, then IO threads are killed down to a base minimum. As such the total number of IO threads is proportional to the current maximum rate of IO transactions thru the system. I could be way off here, but I think the above is fairly accurate, well sorta, maybe. --<cut>-- >I tried to use both. I poll for new commands from the players, and >use the SIGIO signal to hook up a new connection. More than a >little bit dirty. It doesn't work under BSD, then I have to poll >for everything. Look into the select() and poll() calls for *nix work. -- J C Lawrence Internet: claw#null,net (Contractor) 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="msg00086.html">Of disk swapping, database structure & project management..</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00087.html">Re: Greetings. :)</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00046.html">Re: So in an event-driven server, how do you ...</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00088.html">Re: So in an event-driven server, how do you ...</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00090"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00090"><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="00038" HREF="msg00038.html">So in an event-driven server, how do you ...</A></strong>, Michael Hohensee <a href="mailto:michael#sparta,mainstream.net">michael#sparta,mainstream.net</a>, Tue 08 Apr 1997, 00:35 GMT <UL> <li><Possible follow-up(s)><br> <LI><strong><A NAME="00039" HREF="msg00039.html">Re: So in an event-driven server, how do you ...</A></strong>, S001GMU <a href="mailto:S001GMU#nova,wright.edu">S001GMU#nova,wright.edu</a>, Tue 08 Apr 1997, 02:10 GMT </LI> <LI><strong><A NAME="00040" HREF="msg00040.html">Re: So in an event-driven server, how do you ...</A></strong>, Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Tue 08 Apr 1997, 03:42 GMT </LI> <LI><strong><A NAME="00046" HREF="msg00046.html">Re: So in an event-driven server, how do you ...</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 08 Apr 1997, 13:08 GMT </LI> <LI><strong><A NAME="00090" HREF="msg00090.html">Re: So in an event-driven server, how do you ...</A></strong>, clawrenc <a href="mailto:clawrenc#xsvr1,cup.hp.com">clawrenc#xsvr1,cup.hp.com</a>, Sat 12 Apr 1997, 04:31 GMT </LI> <LI><strong><A NAME="00088" HREF="msg00088.html">Re: So in an event-driven server, how do you ...</A></strong>, clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Sat 12 Apr 1997, 04:38 GMT </LI> </UL> </LI> <LI><strong><A NAME="00023" HREF="msg00023.html">Re: Resets and repops</A></strong>, coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Sun 06 Apr 1997, 04:08 GMT <UL> <li><Possible follow-up(s)><br> <LI><strong><A NAME="00052" HREF="msg00052.html">Re: Resets and repops</A></strong>, S001GMU <a href="mailto:S001GMU#nova,wright.edu">S001GMU#nova,wright.edu</a>, Wed 09 Apr 1997, 05:08 GMT </LI> <LI><strong><A NAME="00092" HREF="msg00092.html">Re: Resets and repops</A></strong>, clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Sat 12 Apr 1997, 05:10 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>