Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
Node.js uses V8, the virtual machine that powers Google Chrome, for server-side programming. V8 gives Node a huge boost in performance because it cuts out the middleman, preferring straight compilation into native machine code over executing bytecode or using an interpreter.
Because Node uses JavaScript on the server, there are also other benefits:
- Developers can write web applications in one language, which helps by reducing the context switch between client and server development, and allowing for code sharing between client and server, such as reusing the same code for form validation or game logic
- JSON is a very popular data interchange format today and is native to JavaScript
- JavaScript is the language used in various NoSQL databases (such as CouchDB and MongoDB), so interfacing with them is a natural fit (for example, MongoDB’s shell and query language is JavaScript; CouchDB’s map/reduce is JavaScript)
- JavaScript is a compilation target, and there are a number of languages that compile to it already.4
- Node uses one virtual machine (V8) that keeps up with the ECMAScript standard.5 In other words, you don’t have to wait for all the browsers to catch up to use new JavaScript language features in Node.