How NodeJS Works? What is v8 Engine?

When Ryan Dahl started working on Node, and identifying the right language for creating this piece of software for making scalable server architectures, Javascript may not be the first language of choice. But the modularity, event-driven, asynchronous and concurrency-enabled language that javascript is quite surely fit the bill for his expectations and now javascript has to be compiled and run on a server!

How does Javascript run in a browser lets say Chrome?!

Google has built a system that is part of chrome, called the v8 engine which translates or compiles the JS code in a webpage to a C++ runnable logic and executes it as per the web page logic. This v8 engine is the core of javascript compilation and logical interpretation to make it run in our computer as logic. So extending over this v8 engine with more apt-packages of JS and modularity of it included, is the NodeJS. Obviously Google v8 engine cannot be just used as-is since it was built for web page interpretations and more suitable for webpage javascript.

Now, if you visit https://nodejs.org/en/ – the first thing you see is “Node.js® is a JavaScript runtime built on Chrome’s V8 JavaScript engine“. So its just a chrome rip-off which has more added features to enable it function on server side, and a bloody good one at that!

Leave a Reply