On August 22, 2013 at 2:14:29 PM, Jasmine ([email protected]) wrote: Hi,
After reading a number of papers and journals which describe node as being a single threaded web server running on a single core, I came across this popular stack overflow question which to some extent contradicts my findings: http://stackoverflow.com/questions/2387724/node-js-on-multi-core-machines (please refer to the second answer, the one with over 200 up-votes) it states: "For big heavy compute tasks like image encoding, Node.js can fire up child processes or send messages to additional worker processes. In this design, you'd have one thread managing the flow of events and N processes doing heavy compute tasks and chewing up the other 15 CPUs." Could anyone please clarify which source can be considered as correct? Both! Each process only runs user code on a single thread. File IO is done on threads (Because non-blocking OS primitives leave a lot to be desired), and multi-process design is not the same as threading: there's no shared memory, it's all by message-passing instead. And also, is node considered follow an event-based concurrency paradigm or is it a hybrid between event-based and multi-processing? Very much event-based, but that IS a way to manage multiple processes. —Aria -- -- 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 --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
