450 likes | 589 Views
This video will help you understand all about the Node.js architecture. Node.js architecture is all about managing the incoming requests and providing an appropriate repsonse to each of those requests. This video dives deeper into the working of Node.js and the workflow of the whole server environment.<br>This Node.js training enables you to build network applications quickly and efficiently using JavaScript. The Node.js certification training course is designed to help developers understand and build web applications with the help of JavaScript.<br><br>Node.js Training Key Features<br>1. 100% Money Back Guarantee<br>2. 36 hours of instructor-led online training<br>3. Three real-life, industry-based projects<br>4. 16 chapter-end quizzes<br>5. Master Node.js, Socket.io, Express.js with MongoDB, and SQLite<br>6. Flexibility to choose classes<br><br>Node.js Course Overview:<br>The Node. js certification training course helps you gain an in-depth knowledge of concepts such as Express.js, Node Packet Manager (NPM), shrink-wrap, NPM Vet, REST, Express.js with MongoDB, and SQLite CRUD operations. This Node.js training focuses on the essential concepts of Node.js and provides hands-on experience in building an HTTP server.<br><br>Eligibility:<br>This Node.js Certification Training is ideal for technical project managers, technical leads, full-stack web developers, quality analysts, architects, and students or aspiring professionals who wish to lead web development.<br><br>ud83dudc49Learn more at: https://bit.ly/2W6kBXN
E N D
What’s in it for you? Web Applications
What’s in it for you? Web Applications Node.js Architecture
What’s in it for you? Web Applications Node.js Architecture Advantages
In the Forefront User interacts only with the “Client” of the web application, the rest is handled by “Server” Server Database Client
Behind the Scenes Client Server Database
Behind the Scenes Client Server Database
React JS, Angular Client Server Database
React JS, Angular Node.js, PHP, Java Client Server Database
React JS, Angular Node.js, PHP, Java MySQL, MongoDB Client Server Database
React JS, Angular • User interacts with the “Client” of a web application Client
Node.js, PHP, Java • User interacts with the “Client” of a web application • Server is responsible for taking the client requests, performing the required tasks, and sending the responses back to the clients Server
MySQL, MongoDB • User interacts with the “Client” of a web application • Server is responsible for taking the client requests, performing the required tasks, and sending the responses back to the clients • Database stores the data for a web application. The data can be created, updated and deleted whenever the client requests Database
Architecture • Node.js uses “Single Threaded Event Loop” architecture to handle multiple concurrent clients
Architecture • Node.js uses “Single Threaded Event Loop” architecture to handle multiple concurrent clients • Node.js Processing model is based on the JavaScript Event based model along with the JavaScript callback mechanism.
Node.js Server Event Queue Computation Operation Complete Database Event Loop File System Requests Thread Pool
Node.js Server Event Queue Computation Database Event Loop File System Requests Thread Pool
Node.js Server Event Queue Computation Operation Complete Database Let’s now get to know each part of the Node.js architecture Event Loop File System Requests Thread Pool
Node.js Server Event Queue Computation Database Event Loop File System Requests Thread Pool
Node.js Server Event Queue Computation Database Event Loop File System Requests Thread Pool
Node.js Server Event Queue Computation Operation Complete Database • Clients send request to Web Server Event Loop File System Requests Thread Pool
Node.js Server Event Queue Computation Operation Complete Database • Clients send request to Web Server • Requests can be : • querying for data Event Loop File System Requests Thread Pool
Node.js Server Event Queue Computation Operation Complete Database • Clients send request to Web Server • Requests can be : • querying for data • deleting data Event Loop File System Requests Thread Pool
Node.js Server Event Queue Computation Operation Complete Database • Clients send request to Web Server • Requests can be : • querying for data • deleting data • updating the data, etc. Event Loop File System Requests Thread Pool
Node.js Server Node.js is a server-side platform that takes requests from users, processes those requests and returns responses to the corresponding users Event Queue Computation Database Event Loop File System Requests Thread Pool
Node.js Server Node.js receives requests and places them into the Event Queue Event Queue Computation Database Event Loop File System Requests Thread Pool
Node.js Server Event Queue Computation Database Event Loop File System Requests Node.js internally maintains a Thread Pool Thread Pool
Node.js Server Event Queue Computation Event Loop indefinitely receives requests and processes them Database Event Loop File System Requests Thread Pool
Node.js Server Event Queue Computation External components such as database, file system, and computation Database Event Loop File System Requests Thread Pool
Node.js Server Event Queue Computation Operation Complete Database Now let’s go ahead and understand the workflow Event Loop File System Requests Thread Pool
Event Queue Requests
Event Loop Event Queue Requests
Non- Blocking Operations Event Loop Event Queue Requests I/O Polling (epoll, kqueue, etc.)
Blocking Operations Non- Blocking Operations Event Loop Event Queue Thread Pool Requests I/O Polling (epoll, kqueue, etc.)
Blocking Operations Computation External Resources Database File System Non- Blocking Operations Event Loop Event Queue Thread Pool Requests I/O Polling (epoll, kqueue, etc.)
Advantages • Handling multiple concurrent client requests is fast and easy
Advantages • Handling multiple concurrent client requests is fast and easy • There is no need of creating multiple threads because of Event loop
Advantages • Handling multiple concurrent client requests is fast and easy • There is no need of creating multiple threads because of Event loop • Node.js utilizes less resources and memory