Asynchronous I/O with Node

Node is a fast C++-based JavaScript interpreter with bindings to
the low-level Unix APIs for working with processes, files, network
sockets, etc., and also to HTTP client and server APIs. Except for
some specially named synchronous methods, Node’s bindings are all
asynchronous, and by default Node programs never block, which means
that they typically scale well and handle high loads effectively.
Because the APIs are asynchronous, Node relies on event handlers,
which are often implemented using nested functions and
closures.[23]

This section highlights some of Node’s most important APIs and
events, but the documentation is by no means complete. See Node’s
online documentation at http://nodejs.org/api/.

Obtaining Node

Node is free software that you can download from http://nodejs.org. At the time of this writing, Node
is still under active development, and binary distributions are not
available—you have to build your own copy from source. The examples
in this section were written and tested using Node version 0.4. The
API is not yet frozen, but the fundamentals illustrated here are
unlikely to change very much in the future.

Node is built on top of Google’s V8 JavaScript engine. Node
0.4 uses V8 version 3.1, which implements all of ECMAScript 5 except
for strict mode.

Once you have downloaded, compiled, and installed Node, you
can run node programs with commands like this:

node program.js

We began the explanation of Rhino with its print() and load() functions. ...

The best content for your career. Discover unlimited learning
on demand for around $1/day.