What is MEAN stack ?
- Mean is an acronym made up of commonly used technologies for an all Javascript web stack.
- The acronym “MEAN” stands for “MongoDB ,Express.js, AngularJS & Node.js” and represents a group of technologies which are known to open source well together.
- The major advantage of MEAN stack with Node.js allows you to use Javascript with both side like front side and back end side respectively.
- Most important factor is that stack contains technologies have their large community to help us.
Prerequisites
- First assume that you have knowledge of programming and at least basic knowledge of JavaScript,AngularJS and EXpress.JS.
- Before you start you need to install Node.js and MongoDB on your system.
- Also you have the knowledge about basic application concept CRUD and REST.
Node JS Architecture
Some basic points and questions are in my mind when I have start to understand the Node Js architecture.
- How Node JS works under-the-hood ?
- What type of processing model it is following ?
- How Node Js handle concurrent request ?
- What is single threaded model & Event Loop ?
However without understanding Node JS Internals, we cannot design and develop Node JS Applications very well. So before starting developing Node JS Applications, first we will learn Node JS Platform internals.
- Node JS Platform does not follow Request/Response Multi-Threaded Stateless Model. It follows Single Threaded with Event Loop Model.
- Node JS Processing model mainly based on Javascript Event based model with Javascript callback mechanism.
- The main heart of Node JS Processing model is “Event Loop”. If we understand this, then it is very easy to understand the Node JS Internals.
Single Threaded Event Loop Advantages
- Handling more and more concurrent client’s request is very easy.
- Even though our Node JS Application receives more and more Concurrent client requests, there is no need of creating more and more threads, because of Event loop.
- Node JS application uses less Threads so that it can utilize only less resources or memory
References
How nodejs is handling the non-blocking IO even though it is single threaded?
Node JS Architecture – Single Threaded Event Loop
Comments
Post a Comment