3 ms·
I started using node.js 1 year ago for a personal project and I must say that the callback hell is a real issue to be solved. Personally I think the highland a
by andrea_sdl 12y ago
I started using node.js 1 year ago for a personal project and I must say that the callback hell is a real issue to be solved.
Personally I think the highland approach is too verbose, while the bluebird promises is the one I prefer for both readability and functionality.
Does anyone has used them in big production systems? Are you happy with them?
- pkorzeniewski 12y agoI've been using async for quite long time now and it's absolutely sufficient - never had any problems, it has all the control flow types you'll need and in my opinion it's very readable. It's also the most mature amongst them, so yes, it's definitiely ready for big production systems ;)
- STRML 12y agoI use bluebird in all of my production systems, not only because I believe it creates the most readable code, but also because it can do things that callback flow libraries and async simply cannot do. It's fast to boot and is great for error handling. I highly recommend it.
- spion 12y agoWe use bluebird. With BLUEBIRD_DEBUG=1 we get amazing long stack traces that span across events, and they got even better (cleaner, more accurate) post bluebird 2.8. If willing to take a performance hit (they will remain faster than caolan's async or native promises though), they're also usable in production.
- andrea_sdl 12y agosounds like a really good feature. I think I'll try bluebird on my personal project to rewrite part of the code. thanks
- Lazare 12y agoI like the idea of highland, but I think as a practical matter bluebird promises are the best solution for production. I've used them a fair bit in production, and I'd say yes, I'm quite happy with them. Edit: I've used async too, but I feel that async does not scale well in terms of complexity. When you start needing solid error handling while dealing with multiple async processes with complex mixtures of parallel and sequential...bluebird works, async just ends up as a mess. In my experience, anyhow. Either lib works great for simple uses cases though. :)
- andrea_sdl 12y agoThanks for the reply, this was just what I wanted to understand
- davidw 12y agoOne approach is to use an underlying scheduler so that even while (1) { ... } kinds of things don't lock everything up. This is the approach that Erlang (and therefore Elixir) takes.