Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
pigdog
Apr 23, 2004

by Smythe

Bruegels Fuckbooks posted:

Like, the idea behind node.js is offensive to me. "Let's take javascript, and run it on the server." gently caress, man, seriously? I don't like Ruby on Rails or Django either but the world didn't need a bunch of assholes trying to get javascript to run on a server. They also like trying to make a "native like" platform for web apps, but using javascript for the user interface. There are better tools for doing both of these things. Just because it's possible to write anything in loving javascript doesn't mean it's a good idea.

I don't know much of Node but the tech lead of quite a successful local startup gave a talk about why they use it, and they have some good points. Javascript and node.js are made for and optimized for the web and networking from the ground up, rather than relying on libraries. Most developers need to know Javascript anyway these days, so why not use it on server. Very easy to create and integrate with JSON/RESTful services, because duh. The runtime is very lightweight compared to JVM and that of many other languages. Compile times don't exist, so devs are more productive and deployment is easy. NPM is pretty cool. It's single-threaded but asynchronous, so you get many benefits of multithreading but without the complexity and caveats. They said they design what components they can to be stateless and just run [number of CPU cores] instances of node (behind some kind of load balancer?), and if that works, then they can easily scale it to many servers as well. Etc.

Adbot
ADBOT LOVES YOU

pigdog
Apr 23, 2004

by Smythe
The point is they are making do with Node and without threading, in several datacenters and servicing hundreds of thousands of users -- and scaling across servers is more important anyway. No doublt they could have just as well written the thing in COBOL, but node.js seems to be working for them and that's cool.

For what it's worth npm is rather neat and effortlessly handles version conflicts which in the Java world be jar hell.

  • Locked thread