Quick Contact

    Node JS Architecture

    In Web Applications-:

    In Forefront user interacts only with the Client of the web Application, the rest is handled by “Server”. Like basic infrastructure is-:

    Node JS Architecture

    – Node JS uses “Single Threaded Event Loop” architecture to handle multiple concurrent clients at same time.

    – Node JS model based on JS event based model along with JavaScript call back mechanism that allows having this standard approach that allows you to able to connect with talk and discuss interactions between the client and server, it’s good to have these kind of standards where you are not using something that’s unique to specific framework or specific technology and this just makes it so it’s a more accessible for everybody.

    Node JS Architecture

    Now look at actual NodeJS server itself everything centers are around the concept of event loop and event loop event queue an operation completed and fire requests threaded pool and then you will do actual computation or file system interaction all of this interconnects in a nice seamless loop the great thing again with nodejs is that it’s not new technology’s been around for almost a decade it’s very well tried adds many of the largest websites out there are runny, so let’s now dig into each of the parts of the node.js architecture so let’s talk about some requests so the way that the request works is that you have your framework such as angular on the client and that will then send a request to the web server there’s many ways that those requests can happen through web workers through forms and through other interactions but at some point a request is sent to the server and so these requests can be for data they can be for deleting data they can be for updating data they can be interacting with services as mentioned before but the goal is to have some kind of request now once that request actually hits the server and then we start actually getting into the queuing and thread process that centers around the event loop and this is where know Jeff’s really excels because it’s able to use that single threaded and model to be able to manage from just even a few requests to tens of millions of requests so it receives the actual requests and starts the event here and this is where single threading process starts it’s by queuing everything up appropriately and then it maintains the thread within pool so you have the curing process as one action and then you have a threaded pool which manages those time threads as well and then we have an event loop which you know goes through, receives and processes those requests. External components such as database, file system and computation it could be cloud system it could be an API file system.

    Now look at Work Flow process through following diagram-:

    Node JS Architecture
    1. Handling concurrent client requests is fast and easy.
    2. There is no need of creating multiple threads because of Event Loop;
    3. Node.js utilizes less resources and memory.

    Copyright 1999- Ducat Creative, All rights reserved.