At this point of the chapter, we should have a better understanding of what options we have to tame the asynchronous nature of Node.js. Each one of the solutions presented has its own pros and cons. Let's summarize them in the following table:
Solutions |
Pros |
Cons |
---|---|---|
Plain JavaScript | ||
Async | ||
Promises | ||
Generators |
It is worth mentioning that we chose to present in this chapter only the most popular solutions to handle asynchronous control flow, or the ones receiving a lot of momentum, but it's good to know that there are a few more options you might want to look at, for example, Fibers (https://npmjs.org/package/fibers) and Streamline (https://npmjs.org/package/streamline).