Episode-01 | Introduction to Node Js

mohsin shoaibmohsin shoaib
2 min read

What is Node Js?

Node.js is a tool that allows us to run JavaScript everywhere. Before Node.js, JavaScript could only be executed in the browser. It is a cross-platform JavaScript runtime built on top of Chrome's V8 JavaScript engine.

Wherever there is Javascript, there is a Javascript engine.

History of Node Js

  • In 2009, Ryan Dahl developed Node.js as a side project. The first JavaScript engine for Node.js was SpiderMonkey (the engine for Firefox). However, after just two days, he switched to Chrome's V8 engine.

  • When Ryan was working on Node, there was a company called Joyent that was also working on a very similar project. They were fascinated by Ryan's idea and offered him a job to work with them on building Node. Ryan accepted their offer, and they started funding him to develop Node.js.

  • The original name of Node.js was Web.js, intended for creating web servers. However, they soon realized that Node could be much more powerful than just creating web servers.

  • In 2010, Npm (Node Package Manager) was created by a developer at Joyent. Npm was developed to serve as a global registry where people could upload their own packages.

  • In 2011, Node.js began supporting Windows. Initially, it was only available for macOS and Linux.

  • In 2012, Ryan left the project and handed it over to Isaac (the creator of npm). After Isaac took over, the development of Node.js slowed down and couldn't keep up with the latest releases of Chrome's V8 engine. Because of this, in 2014, Fedor Indutny (another engineer) forked Node.js (since it was open-source), named it Io.js (a copy of Node.js), and started working on it to keep it up-to-date with V8's updates.

  • In 2015, the Node Foundation was formed, and they merged Io.js and Node.js, creating the version of Node.js that we use today.

  • In 2019, the JS Foundation and Node.js Foundation merged and changed their name to the OpenJS Foundation. This new foundation took control over Node.js and has been maintaining it ever since.

Why Node Js was developed?

Before Node.js, Apache was used to create web servers. However, the problem with Apache was its blocking architecture. They wanted to create a non-blocking server because a non-blocking I/O model could handle multiple requests at the same time with fewer threads. A blocking model requires more threads to handle multiple requests simultaneously, which means needing more CPUs and, eventually, more expenses. The non-blocking I/O model was a cost-effective solution as it doesn't require more CPUs.

0
Subscribe to my newsletter

Read articles from mohsin shoaib directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

mohsin shoaib
mohsin shoaib