https://github.com/luciotato/waitfor Wait.for
Sequential programming for node.js, end of callback hell. Simple, straightforward abstraction over Fibers<https://github.com/laverdet/node-fibers> . By using *wait.for*, you can call any nodejs standard async function in sequential/Sync mode, waiting for result data, without blocking node's event loop (thanks to fibers) A nodejs standard async function is a function in which the last parameter is a callback: function(err,data) Advantages: - Avoid callback hell / pyramid of doom - Simpler, sequential programming when required, without blocking node's event loop (thanks to fibers) - Simpler, try-catch exception programming. (default callback handler is: if (err) throw err; else return data) - You can also launch multiple parallel non-concurrent fibers. - No multi-threaded debugging nightmares, only one fiber running at a given time (thanks to fibers) - Can use any node-standard async function with callback(err,data) as last parameter. - Plays along with node programming style. Write your async functions with callback(err,data), but use them in sequential/SYNC mode when required. - Plays along with node cluster. You design for one thread/processor, then scale with cluster on multicores. https://github.com/luciotato/waitfor<https://github.com/luciotato/waitfor#----news---->Bleeding Edge There is *an alternative experimental version of Wait.for, based on JavaScript upcoming ES6-Harmony generators, *instead of node-fibers. * Surprisingly*, ES6 based implementation of *wait.for(asyncFn)* is almost a no-op, you can even completely omit it. Check the following link: Wait.for-ES6: The funny thing is...<https://github.com/luciotato/waitfor-ES6/blob/master/README.md#the-funny-thing-is> <https://github.com/luciotato/waitfor#install-> -- -- 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.
