I think maybe you could use hook.io for this, or at least
a similar approach using IPC.

Have the master process listen for events from all worker processes. If a
worker is getting blocked by something the master process is unaffected and
isolated.

hook.io is nice for this since its essentially zero-config. You can also
just use node's core API for doing cluster / fork. If you are integrating
with a device, hook.io might already have a supporting library for it. If
not, it's easy to build one.


On Fri, Apr 6, 2012 at 12:28 PM, linuxha <[email protected]> wrote:

> On Fri, Apr 6, 2012 at 2:38 PM, Mark Hahn <[email protected]> wrote:
> > How much processing are you doing in a loop?  Usually the time to do
> normal
> > processing tasks if fine in one tick.  The classic example of taking to
> long
> > is calculating a Fibonacci series.
> >
> > In any case, here is a loop that runs until cond is true ...
> >
> > function processOneTick() {
> >     // do work for one tick
> >     if (!cond)  setTimeout processOneTick, 0
> > }
> > processOneTick()
>
> I haven't decided yet. I'm basically just trying to understand how to
> deal with the user code loop so that the ASYNC I/O event won't be
> interfered with but the user code still gets processed. Basically I
> was thinking process a line of user code (interpret & process the
> line), wait some time, next line of user code. Where in the end the
> loop would be run n times/second.
>
> Something similar to Mr. House and Perl (which is pretty much
> synchronous). I'm not used to doing ASYNC in this manner.
>
> --
> 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 [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
>



-- 
-- 
Marak Squires
Co-founder and Chief Evangelist
Nodejitsu, Inc.
[email protected]

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