Node.js modules you should know about: redis(catonmat.net)
catonmat.net
Node.js modules you should know about: redis
http://www.catonmat.net/blog/nodejs-modules-redis/
5 comments
That's why you use flow control libraries such as https://github.com/substack/node-seq or https://github.com/creationix/step.
It'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.
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.