August 2002
- TECH: Path MTU Discovery Eli Stevens
- Matt's java problems.... Adam
- Non-traditional monsters? Jack Britt
- Non-traditional monsters? Brandon J. Van Every
- Non-traditional monsters? Jack Britt
- Non-traditional monsters? Brandon J. Van Every
- Non-traditional monsters? Jack Britt
- Non-traditional monsters? Kwon Ekstrom
- Non-traditional monsters? eric
- Non-traditional monsters? Brandon J. Van Every
- Non-traditional monsters? Damion Schubert
- Non-traditional monsters? Bruce Mitchener
- Non-traditional monsters? Edward Glowacki
- Non-traditional monsters? szii@sziisoft.com
- Non-traditional monsters? Nathan F. Yospe
- OT: Gen Con? Michael Tresca
- Unique items vs. item references Brian Hook
- Unique items vs. item references Vincent Archer
- Unique items vs. item references shren
- Unique items vs. item references Brandon J. Van Every
- Unique items vs. item references lynx@lynx.purrsia.com
- Unique items vs. item references Bruce Mitchener
- Unique items vs. item references Brandon J. Van Every
- Unique items vs. item references fred@clift.org
- Unique items vs. item references shren
- Unique items vs. item references Brandon J. Van Every
- Unique items vs. item references Damion Schubert
- Unique items vs. item references Freeman, Jeff
- Unique items vs. item references Harrok
- Unique items vs. item references Zach Collins {Siege}
- Unique items vs. item references fred@clift.org
- Unique items vs. item references Vincent Archer
- Unique items vs. item references Koster, Raph
- Unique items vs. item references Dave Rickey
- Unique items vs. item references Vincent Archer
- Unique items vs. item references Dave Rickey
- Unique items vs. item references Daniel.Harman@barclayscapital.com
- Unique items vs. item references Sean Kelly
- Unique items vs. item references Damion Schubert
- Unique items vs. item references Smith, David {Lynchburg}
- Unique items vs. item references Sean Kelly
- Character skill amplifying player skill Brian Hook
- Character skill amplifying player skill Daniel.Harman@barclayscapital.com
- Character skill amplifying player skill Ling Lo
- narrative Bruce Mitchener
- narrative Brandon J. Van Every
- narrative Robert Zubek
- narrative Brandon J. Van Every
- narrative Sasha Hart
- narrative Benjamin Tolputt
- [Fwd: [Algorithms] ANNOUNCE: updated Chunked LOD demo] Bruce Mitchener
- (no subject) Jack Britt
- (no subject) Brandon J. Van Every
- (no subject) Jack Britt
- (no subject) Jeff Lindsey
- (no subject) Karl Bastiman
- (no subject) Zach Collins {Siege}
- Advertising Thread Rayzam
- Advertising Thread Brandon J. Van Every
- Advertising Thread Matt Mihaly
- Advertising Thread Brandon J. Van Every
- Advertising Thread Russ Whiteman
- Advertising Thread Koster, Raph
- Advertising Thread Russ Whiteman
- Advertising Thread Kristen Koster
- Advertising Thread Rayzam
- Advertising Thread Brandon J. Van Every
- Advertising Thread Shannon Appelcline
- Advertising Thread Brandon J. Van Every
- Advertising Thread Rayzam
- Advertising Thread Matt Mihaly
- Advertising Thread Daniel.Harman@barclayscapital.com
- Advertising Thread Brandon J. Van Every
- Advertising Thread Daniel.Harman@barclayscapital.com
- Advertising Thread Matt Mihaly
- Advertising Thread Jeremy Noetzelman
- Advertising Thread Amanda Walker
- Advertising Thread Matt Mihaly
- Advertising Thread Jeremy Gaffney
- Advertising Thread Matt Mihaly
- Advertising Thread Michael Tresca
- Advertising Thread Dave Rickey
- Advertising Thread Matt Mihaly
- skills (was (no subject)) Travis Casey
- The total DBMS approach (was: Unique items vs. item references) Derek Licciardi
- The total DBMS approach (was: Unique items vs. item references) Crosbie Fitch
- The total DBMS approach (was: Unique items vs. item references) Valerio Santinelli
- The total DBMS approach (was: Unique items vs. item references) Russ Whiteman
- Socket Code Stephen Miller
- Socket Code Smith, David {Lynchburg}
Stephen Miller wrote:
> So the basic gist of this system would be to have a thread for
> each connection which has a blocking select. Each time the select
> receives input on its socket, it grabs the input and if it should
> have a line, it will lock (through semaphores or mutexes) the
> respective shared memory player queue and push the new line onto
> the back of the queue. Then it unlocks and blocks again for more
> input.
The first, best piece of advice that I possibly have is "check out
the ACE library". You can find it at
http://www.cs.wustl.edu/~schmidt/ACE.html
In brief, it's a cross-platform communications library in C++ with
strong support for socket communications and multithreading.
But aside from the library (and documentation surrounding it), there
are some strong negatives that you'd get with the third method
above, namely thread overhead, working with user-space threads,
ideally, you want to use just many enough threads so that you
maximize processor use (at least one per processor), and so that you
minimize context switching (~= at most one per processor).
The best possible solution (likely), would be to use Posix's AIO
mechanisms; however, this is probably also the hardest to
code. Without AIO, using a thread-pool reactor (the reactor is a
design pattern for event dispatching, and an implementation exists
in the ACE library that is easily used) is likely the best solution,
the thread pool delegates a thread at a time to perform the
underlying select call, then that thread is used (no context switch)
to dispatch/handle the socket event. A thread from the thread pool
then resumes the role as leader and calls select on the fd_set, this
minimizes the time that threads spend in select, minimizes the
number of context switches, and comes close to maximizing throughput
by tuning the number of threads available to the
thread-pool. Nicely, if the thread pool size is too large, the
remaining threads are never unblocked, so context switching is still
minimized.
<sighs> My un-caffeinated brain truly just produced a bunch of
almost unreadable prose there, sorry about that.
A much clearer overview of the reactor pattern can be found:
http://www.cs.wustl.edu/~schmidt/PDF/reactor-siemens.pdf
Happy hunting, and even happier multithreading
-dave - Socket Code Blane Bramble
- Socket Code Smith, David {Lynchburg}
- Origins of "carebear" Koster, Raph
- Origins of "carebear" Steve {Bloo} Daniels
- Origins of "carebear" Koster, Raph
- Origins of "carebear" Madrona Tree
- Origins of "carebear" Calandryll
- Origins of "carebear" Dave Trump
- Origins of "carebear" Koster, Raph
- The total DBMS approach Aaron "the mad man" Weeks
- The total DBMS approach Derek Licciardi
- The total DBMS approach Hanz, Rob
- The total DBMS approach Daniel.Harman@barclayscapital.com
- The total DBMS approach Sean Kelly
- The total DBMS approach Hanz, Rob
- The total DBMS approach Elia Mòˆrling
- The total DBMS approach Daniel.Harman@barclayscapital.com
- The total DBMS approach Ian Macintosh
- Otherland Richard A. Bartle
- Efficiency in providing entertainment John Buehler
- Noncombat(and combat) skills WAS: (no subject) "Arnau Rossell=?US-ASCII?Q?=F3?= Castell=?US-ASCII?Q?=F3?="< arocas@alumni.uv.es>
- Mountaineering and Athletics Brandon J. Van Every
- Mountaineering and Athletics Damion Schubert
- Mountaineering and Athletics John Buehler
- Mountaineering and Athletics Poe, Lawrence
- Mountaineering and Athletics Vincent Archer
- Noncombat(and combat) skills Jo Dillon
- Noncombat(and combat) skills "Arnau Rossell=?US-ASCII?Q?=F3?= Castell=?US-ASCII?Q?=F3?="< arocas@alumni.uv.es>
- They fight! And bite! They fight and bite and fight! Fight fight fight! Bite bite bite! Jack Britt
- They fight! And bite! They fight and bite and fight! Fight fight fight! Bite bite bite! Brandon J. Van Every
- They fight! And bite! They fight and bite and fight! Fight fight fight! Bite bite bite! Artovil
- They fight! And bite! They fight and bite and fight! Fight fight fight! Bite bite bite! Zach Collins {Siege}
- What Ever Happened to Imaginary Realities? Phillip Lenhardt
- What Ever Happened to Imaginary Realities? Richard A. Bartle
- Butterfly.net Matt Mihaly
- Butterfly.net Freeman, Jeff
- Butterfly.net Luca Girardo
- Butterfly.net Luca Girardo
- Mythology Articles Shannon Appelcline
- Item handling (was: Advertising Thread) Jeff Lindsey
- Advertising Thread Brad McQuaid
- Advertising Thread Brandon J. Van Every
- Advertising Thread Damion Schubert
- Advertising Thread Marc Bowden
- Advertising Thread Damion Schubert
- Advertising Thread Richard Aihoshi aka Jonric
- Advertising Thread Russ Whiteman
- Advertising Thread Brad McQuaid
- Advertising Thread Dave Rickey
- Advertising Thread Marc LaFleur
- Advertising Thread Koster, Raph
- Advertising Thread Marc LaFleur
- Advertising Thread Koster, Raph
- Advertising Thread Richard Aihoshi aka Jonric
- Advertising Thread Zach Collins {Siege}
- Advertising Thread Ron Gabbard
- Advertising Thread Richard Aihoshi aka Jonric
- Social Networks Dave Rickey
- Social Networks Brian 'Psychochild' Green
- Social Networks Dave Rickey
- Social Networks Brian 'Psychochild' Green
- Social Networks Bruce Mitchener
- Social Networks Harrok
- Social Networks Freeman, Jeff
- Social Networks Sage
- Social Networks Damion Schubert
- Social Networks Matt Mihaly
- Social Networks Harrok
- Social Networks Matt Mihaly
- Social Networks Tess Snider
- Social Networks Paul Schwanz
- Social Networks Bruce Mitchener
- Social Networks Paul Schwanz
- Social Networks Michael Tresca
- Social Networks Marian Griffith
- Social Networks Zach Collins {Siege}
- Social Networks Freeman, Jeff
- Social Networks Koster, Raph
- Social Networks Dave Rickey
- Social Networks Sasha Hart
- Social Networks Dave Rickey
- Social Networks Koster, Raph
- Social Networks Dave Rickey
- Social Networks Koster, Raph
- Social Networks Dave Rickey
- Social Networks Freeman, Jeff
- Social Networks Jeff Cole
- Social Networks Koster, Raph
- Social Networks Jeff Cole
- Social Networks Matthew Dobervich
- Social Networks Jeff Cole
- Social Networks Dave Rickey
- Social Networks Jeff Cole
- Social Networks Sasha Hart
- Social Networks Nicolai Hansen
- Social Networks Dave Rickey
- Social Networks Paul E. Schwanz, II
- Social Networks Sasha Hart
- Social Networks paul.schwanz@sun.com
- Social Networks Sasha Hart
- Social Networks Matt Mihaly
- Social Networks John Buehler
- Advertising Thread Edward Glowacki
- Advertising Thread Matt Mihaly
- Histories and Legends paul.schwanz@sun.com
- Histories and Legends Koster, Raph
- Histories and Legends Paul Schwanz
- Histories and Legends Matt Mihaly
- Histories and Legends Paul Schwanz
- Histories and Legends Val Trullinger
- Histories and Legends apollyon
- Histories and Legends Matthew Dobervich
- Histories and Legends Koster, Raph
- Histories and Legends Edward Glowacki
- Histories and Legends Sasha Hart
- Advertising Thread Richard A. Bartle
- Where do you get you numbers? NetEngels@aol.com
- Where do you get you numbers? Dave Rickey
- Mud Advertising Matt Mihaly
- Mud Advertising Christopher Allen
- Mud Advertising Brian 'Psychochild' Green
- Online World Timeline slashdotted Koster, Raph
- Online World Timeline slashdotted Lars Duening
- Online World Timeline slashdotted Dave Rickey
- Online World Timeline slashdotted Ted L. Chen
- Online World Timeline slashdotted Russ Whiteman
- Online World Timeline slashdotted Jon A. Lambert
- TECH: Trusting Network Clients Fox McCloud
- TECH: Trusting Network Clients "Arnau Rossell=?US-ASCII?Q?=F3?= Castell=?US-ASCII?Q?=F3?="< arocas@alumni.uv.es>
- TECH: Trusting Network Clients Jeremy Noetzelman
- TECH: Trusting Network Clients Nicolai Hansen
- TECH: Trusting Network Clients Crosbie Fitch
- TECH: Trusting Network Clients Freeman, Jeff
- TECH: Trusting Network Clients Vincent Archer
- TECH: Trusting Network Clients Brack, J. Allen
- TECH: Trusting Network Clients Kwon J. Ekstrom
- TECH: Trusting Network Clients brian hook
- TECH: Trusting Network Clients Crosbie Fitch
- TECH: Trusting Network Clients Koster, Raph
- TECH: Trusting Network Clients Sasha Hart
- TECH: Trusting Network Clients Phillip Lenhardt
- TECH: Trusting Network Clients Sasha Hart
- TECH: Trusting Network Clients apollyon
- TECH: Trusting Network Clients Travis Nixon
- TECH: Trusting Network Clients Sean Kelly
- TECH: Trusting Network Clients Koster, Raph
- TECH: Trusting Network Clients Sean Kelly
- TECH: Trusting Network Clients Paul Schwanz
- TECH: Trusting Network Clients Justin Quimby
- TECH: Trusting Network Clients Steve Dieter
- TECH: Trusting Network Clients Jesus Lopez
- TECH: Trusting Network Clients Nicolai Hansen
- TECH: Trusting Network Clients Tess Snider
- TECH: Trusting Network Clients Crosbie Fitch
- TECH: Trusting Network Clients Christohe Badoit
- TECH: Trusting Network Clients Bruce Mitchener
- TECH: Trusting Network Clients Christophe Badoit
- TECH: Trusting Network Clients Fox McCloud
- TECH: Trusting Network Clients Christophe Badoit
- TECH: Trusting Network Clients Edward Glowacki
- TECH: Trusting Network Clients James Ross Nicoll
- TECH: Trusting Network Clients Phillip Lenhardt
- TECH: Trusting Network Clients Russ Whiteman
- TECH: Trusting Network Clients Ian Macintosh
- TECH: Trusting Network Clients damon baker
- TECH: Trusting Network Clients Benjamin Tolputt
- TECH: Trusting Network Clients David H. Loeser Jr.
- Natural Selection and Communities Paul Schwanz
- Natural Selection and Communities John Buehler
- Natural Selection and Communities Koster, Raph
- Natural Selection and Communities Paul Schwanz
- Natural Selection and Communities Matt Mihaly
- Natural Selection and Communities John Buehler
- Natural Selection and Communities Dave Rickey
- Natural Selection and Communities John Buehler
- Natural Selection and Communities Dave Rickey
- Natural Selection and Communities John Buehler
- Natural Selection and Communities Crosbie Fitch
- Natural Selection and Communities Koster, Raph
- Natural Selection and Communities John Buehler
- Natural Selection and Communities Matt Mihaly
- Natural Selection and Communities John Buehler
- Natural Selection and Communities Dave Trump
- Natural Selection and Communities Matt Mihaly
- Natural Selection and Communities John Buehler
- Natural Selection and Communities Damion Schubert
- Natural Selection and Communities Ron Gabbard
- Natural Selection and Communities Matt Mihaly
- Natural Selection and Communities Paul Schwanz
- Natural Selection and Communities Matt Mihaly
- Natural Selection and Communities Paul Schwanz
- Natural Selection and Communities Matt Mihaly
- Natural Selection and Communities David Kennerly
- Natural Selection and Communities Paul Schwanz
- Natural Selection and Communities Paul Schwanz
- Peer-to-peer hosting of player created content in persistant worlds. Matthew Dobervich
- Sales data Richard A. Bartle
- Sales data Daniel.Harman@barclayscapital.com
- Sales data Luca Girardo
- Sales data Richard A. Bartle
- Sales data Rayzam
- Sales data Robert A. Rice, Jr.
- Cans of Achievements and Quests Rayzam
- Cans of Achievements and Quests Sean Kelly
- Cans of Achievements and Quests Rayzam
- Cans of Achievements and Quests Sean Kelly
- Cans of Achievements and Quests Sasha Hart
- Cans of Achievements and Quests Sean Kelly
- Cans of Achievements and Quests Sasha Hart
- Cans of Achievements and Quests Justin Quimby
- Cans of Achievements and Quests Rayzam
- Cans of Achievements and Quests Paul Schwanz
- Cans of Achievements and Quests Rayzam
- Cans of Achievements and Quests damon baker
- Cans of Achievements and Quests Rayzam
- Cans of Achievements and Quests Michael Tresca
- Cans of Achievements and Quests Rayzam
- Muds and High School Textbooks Jon A. Lambert
- Unruly Players (fwd) J C Lawrence