26 points · by olegp · 16y ago · 26 comments
If we're talking about performance, I'd venture to guess it goes something like this:
C > Java > Scala/Clojure> node.js > Python > Ruby
But then there's all of the other tradeoffs, like how error-prone each environment is or how long it will take to code and debug in each language.
Note that Urban Airship recently did some research and found that Java with direct NIO code worked the best for them, not Netty: http://blog.urbanairship.com/blog/2010/08/24/c500k-in-action...
This said, I think node.js offers great usability while perfomance is pretty good. So if I was developing a new comet solution I would give node a go - you can always rewrite to something more low level once you begin to hit limits. IMO going after java.nio directly is a premature optimization and most projects won't hit limits with node.js.
Other ruby impls (REE, JRuby or rubinius) might be better in those regards. But I wouldn't trust MRI with a long running process that might get under anything but the lightest pressure.
Anybody else coming to ErlangCamp in Chicago this weekend, BTW?
I seem to be fond of languages that make polarizing trade-offs but encourage multi-language programming: Lua, Prolog, Erlang, awk, etc. Use them when they're the best tool for the job, and when they aren't, they'll happily co-operate. Win win. (Requiring people to know multiple languages seems like it'd be a burden, but said languages can also be a lot smaller because they can avoid being responsible for what they're bad at. And, isn't that ultimately the point of DSLs?)
All that being said: node.js is impressively good. Its a beautiful piece of software.
Best of all, there's about eight sample projects that are included in the source code. Ie, they're maintained, always work, and you always have a 'certified' example of how to do something. It's neat, and the community are friendly to boot.