Understanding Node.js: Core Concepts
Understanding Node.js without any other NPM packages. Let's take your back-end engineering skills to the next level!
Understanding Node.js without any other NPM packages. Let's take your back-end engineering skills to the next level!
Welcome to the most comprehensive Node.js course on the internet!
In this course, we're going to do a deep dive into Node.js itself without cluttering our minds with other tools and NPM packages and truly master this powerful technology.
This course is heavily focused on computer science topics and fundamentals that are crucial to understand for becoming a great back-end engineer. You can only properly understand Node.js and unlock its full power if you understand these other computer science topics. So that's why we will also learn these other vital topics so that you can truly master Node.js and take your back-end engineering skills to a whole new level.
We will also use all these vital concepts that we'll learn in practice by building various exciting projects just using Node.js.
This is an intense course for people who want to get to the top of the field and get to a level of driving innovation and making an impact within the industry instead of just scratching the surface and following a few software trends and tools.
Each section of the course is like its own mini-course, and by completing each section, you'll learn some essential Node.js, computer science and back-end engineering concepts that will help you not just if you want to use Node.js but throughout your whole career as a software engineer. These things will stay with you for years and decades to come.
Let's do a quick walkthrough about what you will accomplish after completing some of the sections:
Understanding Buffers: Here, we will deeply understand buffers and how to work directly with binary data, which is essential for all the other sections.
Understanding File System: As a back-end developer, you'll work with files a lot, be it saving some data to disk, handling file uploads and many other examples, so it's essential to have a good understanding of them, which you'll gain after completing this section. We'll also learn how Node.js deals with files and master the "fs" module.
Understanding Streams: In this section, we're going to master Streams, which will allow us to develop highly-performant apps capable of handling terabytes of data with ease while having great memory usage. We'll build many mini-projects throughout the section, including an encryption-decryption app from scratch that could encrypt terabytes of data by directly modifying the binary data. This section lays the foundation for future sections where we'll utilize Streams heavily to create powerful and efficient network applications.
Understanding Networking: Node.js was primarily designed to create network applications, so it's of utmost importance that we gain a decent understanding of networking, which we will do after completing this section. Here's a list of items we'll learn in this section:
What exactly a network is
How the internet works
Mac Addresses
IPV4 & IPv6 Addresses
TCP
UDP
DNS
Fundamentals of deployment
We'll build 2 low-level apps using only Node.js, a chat and a file uploader app directly on top of TCP! And then, we'll deploy them to a Linux server in the most basic way without using unnecessary tools.
We'll see exactly what happens in our network card, every single 0s and 1s exchanged for a particular thing using Wireshark, and gain a much better understanding of networking and how most of the well-known protocols like HTTP, FTP, Email protocols, SSH, DNS and many others work. This section will broaden your horizons, and you'll realize that there are far more things that you can do with Node.js than just creating web servers.
Understanding HTTP: In this section, we'll utilize and combine all that we've learned from previous sections and finally deeply understand HTTP once and for all! We won't be learning how to use Express; instead, we will build something similar ourselves!
We'll start by understanding the most important HTTP concepts, such as connection types, client-server model, messages, requests, responses, HTTP Methods, status codes, mime types, necessary headers and so much more. And then emulate an HTTP protocol directly on top of TCP using the net module and see precisely every single 0s and 1s that get exchanged for an HTTP request and response interaction!
Once we understand the fundamentals of HTTP and the "http" module, we'll take things to the next level and start building our framework. And then, using our framework, we'll make a fully functional web application.
This section will take your web development skills to the next level. You'll have a much better understanding of how all these popular NPM packages, like Express, body-parser, Multer, cors, etc., that are built on top of the "http" module work. Well, you'll learn how to make them from scratch, just using them will not be that much of a problem!
Update February 2024 - New Module Is Out! Understanding Unix:
With over 15 hours of comprehensive new content, get ready to learn how you can harness the power of multiple technologies and programming languages together with Node.js to create extraordinarily powerful applications!
Unix, one of the most influential inventions ever in the software industry, is crucial for software engineers to understand. In this module, we'll delve deep into some of the key concepts such as Bash, Shells, IPC, Data Streams, Process Management, Clustering, even some C and much more.
We will also understand these Node.js modules:
Child Processes
Cluster
Process
Path
Console
OS
All these Unix concepts that you'll learn in this section instantly apply to many other programming languages. You'll gain a foundation that you can keep building on to create much higher-quality applications than ever before.
At the end of the section, we'll develop a video editing web application with Node.js without using other NPM packages. And this is just the beginning! You'll be able to do much more than this once you're done with the section and see many new possibilities that you never thought about before.
Update May 2024 - New Module Is Out! Understanding Compression:
In this section, we will explore the fascinating world of compression. Understanding compression is crucial for reducing the size of your data, and one important use case is to enhance the speed of your network applications. We'll dive into the Node.js Zlib module and see how it is possible to reduce the number of bits needed to store and transfer your data without losing any information!
Update July 2024 - New Module Is Out! Understanding Multi-Threading:
Get ready for the most advanced section of the course, where we're going to utilize the full power of Node.js to see how extreme we can get.
We'll learn what exactly threads are and how to utilize them to achieve performance boosts up to many times, depending on how many CPU cores we have. We'll learn when we should use multi-threading and when we shouldn't. We'll learn how to set up communication channels between our threads, both with message passing and shared memory. We'll explore the Node.js thread pool and even develop one ourselves from scratch. We'll see how multi-threading differs in Node.js from some of the other languages. We'll cover synchronization, race conditions, deadlocks, semaphores, mutual exclusion and more.
You'll learn how to keep the event loop light and not end up doing operations that will mysteriously block your main thread and cause your app to be way slower.
This section will take your Node.js skills to the next level by teaching you how to run things in parallel, handle multiple event loops, and understand the complications that arise with that.
Update March & August 2025 - New Module Is Out! Understanding Cryptography:
In this section you’ll learn about one of the most fascinating topics in computer science, without which the digital world and the internet would be in absolute chaos, and almost anyone could access everything you have online or stored digitally offline.
You’ll learn about some of the same cutting-edge cryptographic tools that governments and top companies rely on to protect their top-secret data and users online. You'll learn about AES, RSA, Diffie-Hellman, Elliptic-Curve Cryptography, HTTPS, TLS, Digital Signatures, Hashing algorithms, and more!
This section will give you a strong foundation to start your journey of learning about cybersecurity. Learning cryptography is extremely important in today’s world, not only to be able to create secure software and protect your business and users, but also to help protect yourself in the digital world.
Jump right in, and let’s explore the principles and techniques that are protecting our privacy, freedom of speech, and security in today’s massive digital world.
Sign up today, and let's master Node.js and take your back-end engineering skills to a whole new level!
Khu vực Câu hỏi thường gặp trống
Introduction
What Exactly Is a File?
How Node.js Deals with Files
Three Different Ways of Doing the Same Thing
Watching the Command File for Changes
Reading the Content of the Command File
Cleaning Up the Code using EventEmitter
Making Sense Out of the Read Data
Implementing the Create File Command
Defining the Rest of the Commands
Solution - Implementing the deleteFile Function
Solution - Implementing the renameFile Function
Solution - Implementing the addToFile Function
Outro
Introduction
Benchmarking Writing a Million Times to a File
Using Streams Naively in Our Solution
So What Exactly Are Streams?
Understanding Different Types of Streams
Fixing the Memory Issue in Our Program
Reading Writable Streams Node.js Docs and Recap
Readable Streams in Action
Selectively Writing Our Data from the Readable Stream
Understanding the Splitting Issue
Implementing the Solution and Resolving the Splitting Issue
Reading Node.js Docs and Recap
Building Our Own Streaming Solution Using Buffers
Understanding Piping
Implementing Our Own Writable Stream
Implementing Our Own Readable Stream
Understanding Duplex and Transform Streams
Creating an Encryption/Decryption Application
Final Notes
Introduction
Understanding MAC Addresses and Switches
Understanding Routers and How the Internet Works
Understanding Networking Layers
Creating a Simple TCP Application in Node.js
Understanding the Transport Layer - TCP/UDP
A Networking Scenario in Action
Understanding Port Numbers
Creating a Chat Application PART 1
Creating a Chat Application PART 2
Improving the UI of our Chat App
Identifying Users in the Chat App
Notifying Everyone When Somebody Joins/Leaves the Chat
Some Final Notes About the Chat App
Deploying our Chat App to AWS
Understanding IPv4 Addresses
Understanding DNS
Understanding IPv6 Addresses
Creating an Uploader Application
Taking Care of Backpressures in the Uploader App
Getting the File Names Dynamically in the Uploader App
Displaying the Upload Progress in Our Uploader App
Deploying our Uploader App
Understanding UDP and the Dgram Module
Outro
Introduction
The Idea of HTTP
Creating a Simple HTTP Server in Node
Understanding HTTP Messages, Requests & Responses
Understanding Connection Types
Building our Client and Sending a Request
Sending a Response to the Client
Learning Postman & Testing Our Server with It
Reading Some Docs
Sending an HTTP Request Directly on Top of TCP! PART 1
Sending an HTTP Request Directly on Top of TCP! PART 2
Emulating our HTTP Server Using the Net Module
Understanding Media Types (MIME Types)
Understanding HTTP Methods
Understanding HTTP status codes
Creating a Simple Web Server in Node
Serving a CSS and JavaScript File
Adding Some JSON Routes
Adding a File Upload Route
Creating our Own Little Mini-Express Framework!
Making our Framework More Robust
Getting Ready for Our Next Project
Using Our Framework to Create a Web App
Adding the Login Route
Understanding HTTP Proxies
HTTP is Stateless
Understanding Cookies
Recognizing Users for Future Requests after Logging In
Sending the User’s Info in Profile
Enhancing Our Framework with Middleware Support
Defining the Middleware Functions
Implementing the Create Post, Update User, and Logout Routes
Outro
Introduction
What Is Unix?
Why Should We Care About Unix?
Setting Up Unix on Windows (WSL) - For Windows Users Only
A First Look at the Child Process Module
Understanding Unix Shells
Demystifying Bash Execution Order: Aliases, Functions, Built-ins, and Path
A Few Notes about Unix File Permissions
Sourcing in Bash
Understanding Shell Config Files
What Exactly is a Child Process?
Understanding Environment Variables
Understanding Unix File System, Paths & CWD
Understanding Stdout, Stdin, and Stderr
Understanding Pipes and Output Redirection in Bash
Building a Command Line Utility with Node.js
Building Massive Communication App - Node Part
Intro to the C Part
Learning C - Our First App
Learning C - Static Types & Our Memory
Learning C - Memory Allocation
Learning C - Reading the Arguments
Building Massive Communication App - C Part
Only Watch if You Skipped the C Part
Another Way of IPC - Unix Domain Sockets
Understanding Clustering
Clustering in Action
Installing & Building FFmpeg from Source Code
Video Editor App - Setup & Walkthrough
Adding the Upload Route
Quick Intro to FFmpeg and Video Files
Making a Thumbnail and Getting the Dimensions After an Upload
Returning the List of Uploaded Videos
Adding a Route for Returning the Video Assets
Adding a Route to Extract the Audio of a Video File
Adding the Resize Route
Scheduling the Resizes
More on Queue-based Processing
Resuming Scheduled Resize Operations Upon App Restart
Running Our Application in Cluster Mode
Refactor from Cpeak to Express in Less than 20 Minutes!
Outro
Introduction
Guide for Skilled Multi-Threaded Developers
What Exactly Is a Thread?
How to Monitor Threads on Your Operating System
Understanding CPU Usage
Spawning Threads
Thread Communication through Message-Passing
Introduction to Our CPU-Intensive Program
Enhancing Performance with Multi-Threading
Handling CPU-Intensive Operations in an HTTP Server
IsMainThread
CPU-Intensive vs. I/O-Intensive
Examining a Crypto-Heavy Multi-Threaded App
Node.js Thread Pool
Developing a Thread Pool From Scratch
Event Loop Utilization and Main Thread
Keep the Main Thread Light with Batch Processing
Effortlessly Expanding Our Thread Pool Capabilities
Don’t Block the Worker Pool!
Handling Billions of HTTP Requests
Communication Through Shared Memory
ArrayBuffers, SharedArrayBuffers, and TypedArrays
Race Conditions
Understanding Atomic Operations
Understanding Mutual Exclusion
Deadlocks
Enhancing Performance Through Shared Memory
Native Multi-Threading with C/C++ Addons
A Deeper Look at the Event Loop PART 1
A Deeper Look at the Event Loop PART 2
Outro
Introduction
Introduction to Symmetric Encryption
The Unbreakable Encryption - OTP From Scratch
How AES Encryption Works
Understanding AES Modes
What It Takes to Break AES
What About Brute-Forcing OTP?
History of AES
Understanding Hashing
SHA-256 From Scratch
What It Takes to Break SHA-256
Message Authentication Codes
Understanding Key Derivation Functions
Building a File Encryption Application
Introduction to Asymmetric Cryptography
A Note about OpenSSL & Setup
RSA in Action
Understanding RSA
Implementing RSA From Scratch
Understanding Digital Signatures
Digital Certificates
Manually Verifying an HTTPS Certificate
Setting Up HTTPS from Scratch
Understanding TLS
Diffie-Hellman and Elliptic Curve Key Exchange
Elliptic Curve Digital Signatures
RSA, DH and EC Security
Outro
At least one year of programming experience
A good knowledge of JavaScript
While not mandatory, a little bit of experience with ExpressJS and HTML could be helpful
Not a strict requirement, but for the Multi-Threading section, it is recommended to be on a machine with a CPU that has at least 4 cores
For the Cryptography section, some basic discrete math is needed; more info on the section’s introduction video
Learn some of the vital concepts of back-end engineering
Get to a level capable of easily learning various NodeJS frameworks and libraries
Truly and deeply understand what exactly NodeJS is and see its full potentials far beyond just creating web servers
Understand and master NodeJS as it is without using any other NPM packages
Understand some of the most important operating systems concepts that every back-end developer needs to understand
Be able to easily learn and understand the NodeJS documentation
Learn how to directly deal with binary data and manipulate the 0s and 1s however you want
Learn the most important Networking concepts and understand where NodeJS exactly comes into play
Learn exactly what happens when you deploy your back-end applications rather than focusing on a few tools
Learn how to create low-level network applications directly on top of TCP or UDP and develop your own protocols
Deeply understand what HTTP really is and how it works
Get a deep understanding of the File System
Master Streams to develop highly performant and memory-efficient applications capable of dealing with terabytes of data with ease
Learn how to incorporate compression to enhance the speed of your network applications
Understand Unix and open up a world of new possibilities
Understand the EventEmitter object
Master Multi-Threading in NodeJS & achieve significant performance improvements
Learn about some of the same cutting-edge cryptographic tools that governments and top companies rely on to protect their top-secret data and users online