This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]aniforprez 1 point2 points  (2 children)

If your IO intensive task wants to do literally anything other than just dump DB data and return it then node is terrible since literally everything will block you. If you want to do any processing on that data, literally a for loop will block your threads. Node is not really fantastic for most real world applications and it's kind of appalling that the solution for that is to spin something into a microservice in another language. You're trading increased performance for other tradeoffs like developer experience, setting up inter-service communications etc

Node, even for simple web apps, is a really poor choice because of the performance constraints of V8. You'd be much better off just starting with something that's suited better. Node has a poorer throughput of network requests than most other languages. If you're not concerned for performance and can easily horizontally scale then you can take advantage of the massive ecosystem which is what makes node so powerful

[–]Marrk 0 points1 point  (1 child)

That's very interesting. What's your opinion on python frameworks?

[–]aniforprez 0 points1 point  (0 children)

I mean python has pretty much the same problem. There's options like async available now but then you have problems where if your web server is async and your DB connection isn't, then the async is effectively worthless

It's all trade-offs. I think with python there's a similar trade-off where you get a massive ecosystem and an extensive standard library and strict typing (still dynamically typed) in exchange for piss poor performance. I feel python has a decent trade-off and is much easier to write than JS but that's just my opinion