Floby, some quick remarks/corrections:

   - streams and pipes are a high level concept. They don't really help 
   with sync-style in low level code (dealing with sequence of calls, 
   conditionals, loops, exception handling, etc.)
   - fibers don't need any special version of node. Fibers is a module that 
   you install with npm, like any other node module.
   - generator based solutions (suspend, galaxy, co, genny, etc.) require 
   node 0.11 or higher. Calling that a "special" version of node is a bit 
   misleading because it seems to imply that node has been tweaked.

Kevin, I guess that the tone of some of these exchanges may surprise you a 
bit. The explanation is that there have been many sour discussions around 
this topic in the past (and I've been one of the most active participants). 
Things are more relaxed these days but people tend to be still a bit edgy. 
To clarify where I stand: I wrote on of the transpiler solutions 
(streamline) as well as one of the generator-based libraries (galaxy). I'm 
also supportive of fibers because it is one of the runtime options behind 
streamline and this is the one that we chose to release our own product.

My only advice to you is to *not* trust what you will read from a single 
source like callbackhell.com but to try things out and make up your own 
mind. Also google around. Look for benchmarks and real-world experiences 
with the solutions, not just opinions.

Bruno
On Saturday, April 19, 2014 12:43:41 PM UTC+2, Floby wrote:
>
> 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