Re: threads or processes?
Re: threads or processes?
- Subject: Re: threads or processes?
- From: Chuck Remes <email@hidden>
- Date: Sat, 28 Jan 2006 15:06:19 -0600
On Jan 28, 2006, at 2:55 AM, Andrew Bush wrote:
Hi all,
Im looking at writing an app that will be required to have a number
of connections to a remote server going at once, up to 100-200.
Im wondering whether the best design in mac os x would be to use
multiple processes...spawn one process for each server and let them
do their thing...or whether I would get better performance by
handling with them all in one process.
opinions?
Many high performance TCP comm servers are written in an event-driven
style. I recommend taking a look at this web page [1] which compares
select/poll/kqueue type servers and thread based servers.
Also, take a look at the Reactor design pattern [2] which lends
itself quite nicely to your requirement.
The people in this thread advocating using the runloop are on the
right track.
cr
[1] http://www.kegel.com/c10k.html
[2] http://www.cs.wustl.edu/~schmidt/patterns-ace.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden