When we have been making large scale software a few things have come up. 1. Callbacks suck for linear workflows (a->b->c)
This kind of workflow results in what I like to call the mudslide. Your code really wants to expand into some minor nesting once you have shared state (sometimes immutable state and idempotentcy is a perf issue in resource starved JS [rare use case generally]). But often when composing parallel workflows this is better for composability (using `.bind` or `npm i async`) vs many `.then` calls on a promise. 2. Promises suck for branching workflows (a->(b&&c)->d) When promises enter the parallel (not async) workflow we start to see some fun things happen. `.then` is called, a lot , which gets confusing to read. Promises on their own need some help when making a join after a fork (see `npm i q`). This parallels to the composability fixes using `async.waterfall` above. 3. Domain all the things IDC what it is, if you are serious, both need domains. That being said, there are wrappers both ways, but mostly: determine what kind of workflow you do most often. Most of my things would be awesome if they were linear, but often im grabbing multiple things at once using `async.parallel` combined with `async.waterfall`. -- -- 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 --- 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 nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.