threads-a-gogo and node cluster are only 2 possible solutions. also you can put your heavy calculating routine in a separate module which runs in a separate process and handles a queue and a worker pool. fork it and comunicate via process#send. it's a system-internal service process.
Am Freitag, 15. Februar 2013 07:08:44 UTC+1 schrieb Jorge: > > On 14/02/2013, at 20:28, Jacob Groundwater wrote: > > > > I think the solution to any CPU intensive task is a work queue. Do not > mix your IO-bound processes with your CPU-bound processes. Node doesn't > suck at CPU-bound tasks, it just can't do IO at the same time. > > But a node with -javascript- threads *can* do IO *and* CPU-bound tasks at > the same time. > > > It's not like a threaded app will magically have more CPU to compute > with. > > Yes it will, in an N cores machine, a node with N threads has ~ N times > more CPU to compute with. > > Even in a single core machine, a node with threads-a-gogo can do any > amount of -javascript- CPU-bound tasks *and* any IO in parallel, easily and > without sttutering, something that no node can do without threads-a-gogo. > > <https://github.com/xk/node-threads-a-gogo> > -- > Jorge. -- -- 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.
