Hi,

I'm CS student who is new to Node, and I have two questions:

   1. Is there currently an existing mechanism (e.g. module, core 
   functionality) that allows Node applications to spawn multiple threads (to 
   take advantage of multiple cores for true parallelism) ?
   2. If not, would this be a desirable feature?

My understanding is that Node applications use a single thread to handle 
everything by queuing events on an event loop to be processed sequentially.
I also understand that this is the core feature that allows Node to grant 
efficiency gains for specific types of applications, and is the (main?) 
source of Node's popularity.

Given this fact then (and assuming that it's correct), it would seem 
counter-intuitive to enable multi-threaded functionality in Node when there 
are other languages/frameworks available potentially more suited to 
multi-threaded behavior. 
However, an example use case that I'm thinking of is a situation whereby an 
existing Node application needs to be adapted or extended with some 
functionality that would benefit from true parallelism.
So, maybe 3 or 4 threads could be created that would handle 3 or 4 tasks 
more efficiently than Node's existing sequential behavior, while still 
taking advantage of Node's established execution model in other areas of 
the application.

I was thinking along the lines of creating a Node module that exposes an 
interface for creating threads and supplying them with the necessary 
function (and also some mechanisms for dealing with shared data concurrency 
and consensus issues).
I have searched unsuccessfully through available resources in an attempt to 
answer the above questions, so I'm hoping that someone can help me out.

Regards,
-Rob

-- 
-- 
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.


Reply via email to