Just a note that this post is from January 15th - I believe that promises have been removed from Node.js since then.
http://howtonode.org/control-flow-part-ii has some good information on control flow using callbacks.
http://howtonode.org/control-flow-part-ii has some good information on control flow using callbacks.
Since the pattern is predictable, it's easy to write a higher level wrapper around it. I like Kris Kowal's Q promises [1] for most things and Tim Caswell's Do [2] for simple sequencing (a la shell scripts).
[1] http://github.com/kriskowal/q/blob/master/q.js [2] http://howtonode.org/do-it-fast