Can everybody be adult about this once and for all? 

Your problem is not asynchrony vs synchrony. Please forget these words. Nothing 
ever happens synchronously on a computer. You've been lied to all your life, 
sorry. 

Your problems is about flow control. Flow control is a set of patterns for 
scheduling atomic actions. Some actions can be gathered together as a single 
operation. These are functions in javascript. Some operations need to wait for 
something else to finish. These are async operations. In some environments, 
async operations are made to look synchronous using things such as threads, 
processes and fibers. But they are not synchronous. If you're comfortable with 
hiding this complexity, you can use python or ruby (or anything else, really) 

The problem you are having can be solved by choosing a method of scheduling. In 
node the following methods exist. 

Pipelines : streams and pipe(). These are core core methods. Several stream 
modules exist. 
Callbacks scheduler : async, flowjs, step, etc. 
Promises : rsvp, futures, etc. 
Transpilers : streamline, iced coffeescript (these are not strictly javascript) 
Async/wait : fibers, galaxy, etc. (these need a special version of node) 

The names on the right hand side are npm modules.

It is up to you to choose what method you prefer. They all have their pros and 
cons. My advice is to read up on each at callbackhell.com. 

My second advice is to ask people trying to sell you their stuff in which 
category their stuff belongs. 

My third advice is to use async.waterfall from the async library. And this is 
my favourite way of doing things. 

Hope this makes things a bit clearer. 



Floby. 

-- 
-- 
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/d/optout.

Reply via email to