News for hackers. Stuff that matters.
Re:Nodejs and MongoDB, A Beginner's Approach by senko on Monday October 31, 2011 @07:33AM (#3177048)
It's generally true for Node when you have a lot of chained I/O. You can somewhat avoid it using events (so you set up event listeners instead of just chaining callbacks endlessly). So far I haven't seen any MongoDB module for Node taking advantage of those (haven't looked a lot yet, though).
Re:Nodejs and MongoDB, A Beginner's Approach by viscanti on Monday October 31, 2011 @09:43AM (#3177317)
I've used EventEmitter on a couple toy projects, but I've always assumed that's adding a bit more overhead to everything than just using callbacks. It's easier to read though and probably easier for someone else to figure out in the future. I've played with node.js libraries that have callbacks strung out over several files, so tracking down exactly where some behavior is happening isn't easy.

There are a few examples out there about using events/listeners, but I think there's room for a really good one.

Re:Nodejs and MongoDB, A Beginner's Approach by ksetyadi on Monday October 31, 2011 @07:43AM (#3177067)
Using event instead of callback to sequentially get the results with asynchronous way it's a potentially good idea. I also haven't learn much about another Nodejs-MongoDB libraries except the one what I have mentioned there. Please share if you have a follow-up on this technique.
Re:Nodejs and MongoDB, A Beginner's Approach by mcantelon on Monday October 31, 2011 @01:44PM (#3178272)
Mongoose is pretty good for succinct Node/MongoDB interaction.