Node.js

Glazed over in three minutes.

Node.js is server side javascript (not a Javascript framework). Node.js is completely event based. Node.js is single-threaded. Node.js runs on a V8 environment. Let’s explore what all that means (quickly):

Node.js is server side Javascript. This means that, when a software program is executed on Node.js, it sends instructions to the computer’s processor and access the computer’s memory and other system resources using Javascript.

Node.js is completely event based. Node’s flow control is determined by events or changes in state. It listens for events and calls a callback function once an event has occurred and has been tracked. That means the order of execution is determined by the occurrence of events.

Node.js is single-threaded (with background workers). Node.js creates an event loop that queues events and runs them asynchronously/non-blocked until completion. In other server-side languages like PHP and Apache, the server will create a new thread for each client request. Node will create a single thread event loop. For example, two functions cannot run at the same time.

Node.js runs on a V8 environment. V8 is Google’s open source high-performance JavaScript engine, written in C++ (apart of the Chromium). Node’s javascript is executed by the V8 engine which translates JavaScript code into quicker machine code instead of using an interpreter.

That’s it (for now) !

Show your support

Clapping shows how much you appreciated Shaka Lee’s story.