4 ms·
Off-topic. Don't get me wrong I love Redis, but this is the library that made me hate the nesting nastiness of Node.js... And basically I stopped writing Node.
by igorgue 15y ago
Off-topic.
Don't get me wrong I love Redis, but this is the library that made me hate the nesting nastiness of Node.js... And basically I stopped writing Node.js after that project.
And yes, I tried the "create a bunch of little callback functions" trick, and it just doesn't feels right, IMHO is still hard to read.
- pkrumins 15y agoThat's why you use flow control libraries such as https://github.com/substack/node-seq https://github.com/substack/node-seq or https://github.com/creationix/step https://github.com/creationix/step.
- mpobrien 15y agoIt's not mentioned in the article, but using the MULTI command (exposed as client.multi() in this module) can sometimes help alleviate this if you need to execute multiple redis commands whose inputs/outputs do not depend on each other.