Like The Force, promises permeate our Node.js universe and yet are mostly invisible, due to the magic of async/await. But promises are the basics of Node’s asynchronicity, and we can do cool things with them. We’ll talk about the basics, about parallel execution, serial execution, throttling execution, getting the error as a result, testing async calls, unhandled promise rejection, converting callbacks and streams to Promises, and even the hackiest of them all: resolving a promise from the outside!
After that, Node.js will not be the same again. Promise.
30 years of experience have not dulled the fascination Gil Tayar has with software development. His passion is distributed systems and figuring out how to scale development to big teams. Extreme modularity and testing are the main tools in his toolbelt, using them to combat the code spaghetti monster at companies like Wix, Applitools, and at his current job as software architect at Roundforest.
In his private life, he is a dad to two lovely kids (and a cat), an avid reader of Science Fiction, (he counts Samuel Delany, Robert Silverberg, and Robert Heinlein as favorites) and a passionate film buff. (Stanley Kubrick, Lars Von Trier, David Cronenberg, anybody?)
Unfortunately for him, he hasn’t answered the big question of his life—what’s better, static or dynamic languages? But he’s working on it.