On Fri, Apr 6, 2012 at 3:22 PM, Tim Caswell <t...@creationix.com> wrote:
> Keep in mind that the nextTick hack technique still blocks your CPU.  It's
> just broken up into many small parts.  If you must do something that's truly
> CPU intensive, put it on a thread or another process.  Most modern machines
> (even phones) have multiple CPU cores.
>
> Interprocess communication is a fairly well solved problem in node.  There
> is the built-in cluster module, there is the child_process.fork function
> (somewhat like a webworker, but using a full child process).  Then in
> userland there are things like dnode, hook.io, architect-protocol that
> provide various levels of abstraction.

I'm in the design stage at the moment. I've written some test code for
a few ideas.  I'm stealing ideas from Mr. House (Perl) and a product
called the HCS II (assembler). Both are Home Automation products. At
the moment I have the ideas I don't have the code. :-) My use of
node.js isn't really the web part (yet).

I've not found the proper use of threads with node yet. But I will
take a look at the above info (thanks!). I'm new to node.js and
learning my way through it. I'd like threads as I could toss the user
code in a thread, let it loop (n times/sec so as not to eat the cpu
alive) and exchange information with the ASYNC I/O via queues (again
I've only given it some thought not my full attention yet).

-- 
Neil Cherry
Linux Home Automation ( http://www.linuxha.com/ )
Author: Linux Smart Homes For Dummies ( http://linuxha.com/FD/book/index.html )

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to