Node JS: Advanced Concepts
Get advanced with Node.Js! Learn caching with Redis, speed up through clustering, and add image upload with S3 and Node!
Get advanced with Node.Js! Learn caching with Redis, speed up through clustering, and add image upload with S3 and Node!
Go beyond the basics of Node! This course will give you the skills needed to become a top Node engineer.
Query Caching with Redis? You will learn it. The Node Event Loop? Included. Scalable File Upload? Of course!
------------------------------
This is a must-take course if you work with Node.
Node Internals: Here's one of the most common interview questions you'll face when looking for a Node job: "Can you explain Node's Event Loop?" There are two types of engineers: those who can describe the Event Loop and those who cannot! This course will ensure that you are incredibly well prepared to answer that most important question. Besides being critical for interviews, knowledge of the Event Loop will give you a better understanding of how Node works internally. Many engineers know not to 'block' the Event Loop, but they don't necessarily understand why. You will be one of the engineers who can clearly articulate the performance profile of Node and its Event Loop.
Caching with Redis: We'll also supercharge the performance of database queries by implementing caching backed by Redis. No previous experience of Redis is required! Redis is an in-memory data store purpose built for solving caching needs. By adding caching to your application, you can decrease the amount of time that any given request takes, improving the overall response time of your app.
File Upload: There are many resources online that offer suggestions on how to handle file upload, but few show a solution that can truly scale. Hint: saving files directly on your server isn't a scalable solution! Learn how to leverage AWS S3 to implement file upload that can scale to millions of users with a few dozen lines of simple code. Plentiful discussions are included on security concerns with handling uploads, as well.
Continuous Integration Testing: This is a must have feature for any serious production app. We'll first learn how to test huge swaths of our codebase with just a few lines of code by using Puppeteer and Jest. After writing many effective tests, we'll enable continuous integration on Travis CI, a popular - and free - CI platform. Testing can sometimes be boring, so we'll use this section to brush up on some advanced Javascript techniques, including one of the only legitimate uses of ES2015 Proxies that you'll ever see!
------------------------------
Here's what we'll learn:
I've built the course that I would have wanted to take when I was learning to Node. A course that explains the concepts and how they're implemented in the best order for you to learn and deeply understand them.
FAQ area empty
How to Get Help
Xem trướcCourse Resources
Xem trướcStarting With Node Internals
Xem trướcModule Implementations
Xem trướcNode Backed by C++!
Xem trướcTest Your Knowledge - Node's Implementation
Xem trướcThe Basics of Threads
Xem trướcThe Node Event Loop
Xem trướcThe Event Loop Implementation
Xem trướcEvent Loop Ticks
Xem trướcIs Node Single Threaded?
Xem trướcTesting for Single Threads
Xem trướcThe Libuv Thread Pool
Xem trướcThreadpools with Multithreading
Xem trướcChanging Threadpool Size
Xem trướcCommon Threadpool Questions
Xem trướcExplaining OS Operations
Xem trướcLibuv OS Delegation
Xem trướcOS/Async Common Questions
Review
Check Your Knowledge - The Event Loop
Crazy Node Behavior
Unexpected Event Loop Events
Enhancing Performance
Express Setup
Blocking the Event Loop
Clustering in Theory
Forking Children
Clustering in Action
Benchmarking Server Performance
Benchmark Refactor
Need More Children!
PM2 Installation
PM2 Configuration
Important Note about the Upcoming Videos
Webworker Threads
Worker Threads in Action
Benchmarking Workers
MongoDB Query Performance
Query Caching Layer
Redis Introduction
Installing Redis on MacOS
Redis on Windows
Getting and Setting Basic Values
Redis Hashes
One Redis Gotcha
Cache Keys
Promisifying a Function
Caching in Action
Caching Issues
The Ultimate Caching Solution
Patching Mongoose's Exec
Restoring Blog Routes Handler
Unique Keys
Key Creation
Restoring Redis Config
Cache Implementation
Resolving Values
Hydrating Models
Hydrating Arrays
Toggleable Cache
Cache Expiration
Forced Cache Expiration
Nested Hashes
Clearing Nested hashes
Automated Cache Clearing with Middlware
Testing Flow
Testing Challenges
Commands Around Testing
First Jest Test
Launching Chromium Instances
Chromium Navigation
Extracting Page Content
Puppeteer - Behind the Scenes
DRY Tests
Browser Termination
Asserting OAuth Flow
Asserting URL Domain
Issues with OAuth
Solving Authentication Issues with Automation Testing
The Google OAuth Flow
Inner Workings of Sessions
Sessions From Another Angle
Session Signatures
Generating Sessions and Signatures
Assembling the Pieces
WaitFor Statements
Factory Functions
The Session Factory
Assembling the Session Factory
Code Separation
Required Update to Global Jest setup.js
Global Jest Setup
Testing Factory Tests!
Adding a Login Method
Extending Page
Introduction to Proxies
Proxies in Action
Combining Object Property Access
Combining the Page and Browser
Custom Page Implementation
Function Lookup Priority
Gee, I Hope This Works!
Reusable Functions on Page
Testing Blog Creation
Default Navigation
Asserting Form Display
Test Timeout
Common Test Setup
Nested Describes for Structure
Asserting Validation Errors
Asserting Form Confirmation
Asserting Blog Creation
Options for Testing Prohibited Actions
Direct API Requests
Executed Arbitrary JS in Chromium
Asserting Page Response
Get Restrictions
A Final 'GET' Test
Super Advanced Test Helpers
Completed Code Checkpoint
Introduction to CI
CI Providers
The Basics of YAML Files
Github Actions instead of Travis for CI
Travis YAML Setup
More Travis YAML
Client Builds
Script Config
Using Travis Documentation
More Server Configuration
Note - Travis Update
A Touch More Configuration
Git Repo Setup
Travis CI Setup
Triggering CI Builds
Build Success
Completed Code Checkpoint
Image Upload
Big Issues Around Image Upload
Alternate Image Upload
Chosen Storage Solution
Upload Constraints
Image File Transport
Upload Flow with AWS S3
Details of the Presigned URL
Security Issues Solved with Presigned URL's
Adding an Image Picker
Handling File Changes
Recording Image Files
The SubmitBlog Function
AWS Credentials with IAM
Creating S3 Buckets
Allowing Actions with IAM Policies
Creating IAM Users
Upload Routes Files
Required update for uploadRoutes
Configuring the AWS SDK
GetSignedURL Arguments
Calling GetSignedURL
Viewing the Signed URL
Attempting Image Upload
CORS Configuration in JSON Form
Handling CORS Errors
Outstanding Issues
S3 Bucket Policies
Tying Uploads to Blogs
Ensuring Images get Tied
Displaying Images
Completed Code
Basic knowledge of Node, Express, and MongoDB
Strong knowledge of Javascript
Absolutely master the Event Loop and understand each of its stages
Utilize Worker Threads and Clustering to dramatically improve the performance of Node servers
Speed up database queries with caching for MongoDB backed by Redis
Add automated browser testing to your Node server, complete with continuous integration pipeline setup
Apply scalable image and file upload to your app, utilizing AWS S3
1.2
1 Student
320 Courses
1253 Reviews
Xin chào các bạn, tôi là Nguyễn Đình Cường, một lập trình viên và giảng viên đam mê công nghệ với hơn 15 năm kinh nghiệm trong ngành công nghiệp phần mềm. Tôi tốt nghiệp từ Bưu Chính Viễn Thông và đã từng làm việc cho một số công ty công nghệ hàng đầu như FPT Software và VinGroup. Với chuyên môn chính là phát triển ứng dụng web, tôi đã làm việc với nhiều công nghệ như HTML, CSS, JavaScript, React cho front-end và Node.js, Express, MongoDB cho back-end. Không chỉ dừng lại ở việc viết mã, tôi còn yêu thích tìm hiểu sâu về thiết kế hệ thống và kiến trúc phần mềm. Tôi tin rằng quá trình học lập trình không chỉ đơn thuần là lý thuyết, mà còn là sự trải nghiệm thực tế và giải quyết vấn đề. Trong các khóa học của mình, tôi cố gắng cung cấp cho học viên những bài giảng thú vị và dễ hiểu, cùng với các bài tập thực hành giúp củng cố kiến thức. Tôi hy vọng rằng qua các khóa học của mình, bạn sẽ không chỉ học được cách viết mã, mà còn phát triển tư duy lập trình và kỹ năng giải quyết vấn đề. Hãy cùng nhau khám phá thế giới lập trình và biến ý tưởng của bạn thành hiện thực! Nếu bạn có bất kỳ câu hỏi nào, đừng ngần ngại liên hệ với tôi. Tôi rất vui được hỗ trợ bạn trong hành trình học tập của mình!
View Details