It took me a while to get a good conceptual understanding of the node async networking layer (I still don't have a concrete understanding). I just did a quick search around and didn't really find anything. I think it's really interesting and instructive to get a handle on how different OSes enable asynchronous networking and the choices that were made in node. And how all these eventually coalesced into libuv. There's a great resource on libuv here http://nikhilm.github.com/uvbook/index.html. But it doesn't go into the underlying implementation much.
If someone has better resources, I encourage them to post here. :Marco On Wednesday, November 7, 2012 3:05:39 PM UTC-8, Isaac Schlueter wrote: > > Node uses threads for file system IO and for some slow CPU-intensive > operations, and for system calls that are not available > asynchronously, and for spawning child processes (since you can't > actually do that without a fork call.) > > It does *not* use threads for async network IO, because it's > unnecessary, and it certainly does not spawn a thread for each request > to an HTTP server, or for each outbound HTTP request it makes. > > > On Wed, Nov 7, 2012 at 2:27 PM, mscdex <[email protected] <javascript:>> > wrote: > > On Nov 7, 5:00 pm, Alberto Gori <[email protected]> wrote: > >> Am I wrong? > > > > The only place the thread pool in node is used (AFAIK) is for async > > file system calls. So, network I/O does not use extra threads as you > > suggest. There is one main thread where the event loop lives and where > > everything happens (except async file system calls as previously > > noted). > > > > -- > > Job Board: http://jobs.nodejs.org/ > > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > > You received this message because you are subscribed to the Google > > Groups "nodejs" group. > > To post to this group, send email to [email protected]<javascript:> > > To unsubscribe from this group, send email to > > [email protected] <javascript:> > > For more options, visit this group at > > http://groups.google.com/group/nodejs?hl=en?hl=en > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
