28

Ok this is probably a little blunt and to the point, but what is the point/need for Node.js

I've noticed it mainly through CloudFoundry but just not too sure what its supposed to be doing. However I am guessing its probably something pretty big as why else would VMWare be supporting it.

Thanks in advance.

Jeff Sloyer
  • 4,899
  • 1
  • 24
  • 48
Clive
  • 3,991
  • 3
  • 17
  • 15

5 Answers5

20

It's an...

  • Efficient and 100% event driven IO framework,
  • flexible enough to use the best underlying OS features it can find,
  • presenting an API in a high-level programming language (the same language your client-side will most-likely use),
  • implemented on top of the best available intepreting engine for that language, and
  • supporting more and more third party libraries with each passing day.
  • Effecient in server side api, avoid using for CPU intensive operation

:)

GunasekaranR
  • 169
  • 1
  • 11
salezica
  • 74,081
  • 25
  • 105
  • 166
14

Node.js does IO right. It's asynchronous and non-blocking and the beauty of using js is that it does not have a standard blocking IO.

It's fast (v8 is a beast), it scales well, It's got a vibrant community and it's popular.

There are lots of wonderful libraries that run on node like now and socket.io.

It excels at real time communication and highly concurrent websites.

It also has the added bonus of less code duplication. You can write the same MVC code on the client as the server and easily support non-js users.

Further reads:

Community
  • 1
  • 1
Raynos
  • 166,823
  • 56
  • 351
  • 396
9

Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript engine. Node.js is commonly used for heavy client-server JavaScript applications.

The node.js tag has some more background information to point you in the right direction: https://stackoverflow.com/tags/node.js/info

Community
  • 1
  • 1
recursive
  • 83,943
  • 34
  • 151
  • 241
7

Node leverages Javascript's first class functions to allow you to program the server in a dynamic scripting language while getting very competitive performance.

Node isn't as fast as Haskell, Erlang or Go. But it is competitive with Java, and it outperforms Ruby, Python and PHP.

Haskell, Erlang, Go, Java, Ruby, and Python all have evented IO webframeworks, but they also have blocking libraries to serve as pitfalls.

Despite it's warts, Javascript is the lingua franca of the web and since browsers are evented, not only is Javascript built for evented style programming, most web developers are used to writing evented Javascript.

Also check out this register article: http://www.theregister.co.uk/2011/03/01/the_rise_and_rise_of_node_dot_js/

generalhenry
  • 17,227
  • 4
  • 48
  • 63
  • Do you have any benchmarks on haskell & Go being faster? – Raynos Jun 01 '11 at 22:19
  • http://www.ostinelli.net/a-comparison-between-misultin-mochiweb-cowboy-nodejs-and-tornadoweb/ – generalhenry Jun 01 '11 at 22:22
  • http://www.yesodweb.com/blog/2011/3/preliminary-warp-cross-language-benchmarks – generalhenry Jun 01 '11 at 22:22
  • Those cover Haskell & Erlang. I want a statement saying Go is faster then node. The haskell comparisons are also unfair due to not using multiple node processes to scale across cores. I can believe haskell has an edge but its not overwhelming – Raynos Jun 01 '11 at 22:32
  • I've seen ones that also include Go, but google is ironically bad at searching for Go (or golang since it's mostly referred to as Go) – generalhenry Jun 01 '11 at 22:32
  • 1
    Go and Haskell are strongly typed and compiled with multiprocessor concurrency models deeply embedded in the language. They're faster, they use less memory. But they're are reasons Node.js has a larger community. (and why I personally use Node.js) – generalhenry Jun 01 '11 at 22:36
2

This post might help:

Why Developers Should Pay Attention to Node.js

Matt Roberts
  • 26,371
  • 31
  • 103
  • 180