I've gone through what you said, and here are my results:

- Child_process is slow to startup (30 ms) and consumes 10 MB base since its a whole new V8 instance. Maybe if these are started and not stopped and used alongside a job queue it could work. But it cannot work like "async function calls" where you start one for each small calc you need to do.

- WebWorkers seem to be an HTML5 integration API, and extra bloat is not needed

- Cannot find anything like "backgrounder"

- Gearman-node seems more suited to longer running jobs, and not 1 sec tasks.

- Resque seems to be a reliable queue, should one be needed. -- https://github.com/blog/542-introducing-resque

Currently I'll just run my calc on the main CPU and see what happens. Any ideas anybody?

- Should I use gearman?
- Or should I go with child_process since I currently have the task code also written in NodeJS, and not C++.


On 4/9/2012 4:15 PM, Oleg Efimov (Sannis) wrote:
Yes, you can execute them in child_process. Also where may be already existing modules, try look for maintained forks of "webworkers" or "backgrounder".
Also you can use queues: kue or geaman-node

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

Reply via email to