Skip to main content

Node JS: Advanced Concepts

16h 28s
English
Paid

Course description

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.  

Read more about the course

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:

  • Master the Node Event Loop - understand how Node executes your source code. 
  • Understand the purpose of Node, and how the code you write is eventually executed by  C++ code in the V8 engine
  • Add a huge boost to performance in your Node app through clustering and worker threads
  • Turbocharge MongoDB queries by adding query caching backed by a lightning-fast Redis instance
  • Scale your app to infinity with image and file upload backed by Amazon's S3 file service
  • Implement a continuous integration testing pipeline so you always know your project functions properly
  • Think you know everything there is about managing  cookies and session?  Well, you might, but learn even more!
  • Ensure your app works the way you expect with automated browser testing using Jest and Puppeteer
  • Bonus - learn advanced JS techniques along the way, including where to use ES2015 proxies!

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.

Requirements:
  • Basic knowledge of Node, Express, and MongoDB
  • Strong knowledge of Javascript
Who this course is for:
  • Anyone who wants a deep mastery of Node
  • Engineers looking to understand the internals of Node
  • Programmers looking to improve Node's performance

What you'll learn:

  • 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

Watch Online

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 162 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: 1.1. How to Get Help

All Course Lessons (162)

#Lesson TitleDurationAccess
1
1.1. How to Get Help Demo
01:08
2
1.4. Starting With Node Internals
03:48
3
1.5. Module Implementations
08:24
4
1.6. Node Backed by C++!
06:34
5
1.8. The Basics of Threads
06:30
6
1.9. The Node Event Loop
06:35
7
1.10. The Event Loop Implementation
07:23
8
1.11. Event Loop Ticks
06:47
9
1.12. Is Node Single Threaded
05:07
10
1.13. Testing for Single Threads
06:50
11
1.14. The Libuv Thread Pool
03:08
12
1.15. Threadpools with Multithreading
06:07
13
1.16. Changing Threadpool Size
05:26
14
1.17. Common Threadpool Questions
03:17
15
1.18. Explaining OS Operations
03:53
16
1.19. Libuv OS Delegation
03:20
17
1.20. OSAsync Common Questions
02:41
18
1.21. Review
02:49
19
1.23. Crazy Node Behavior
07:40
20
1.24. Unexpected Event Loop Events
11:24
21
2.1. Enhancing Performance
02:18
22
2.2. Express Setup
03:23
23
2.3. Blocking the Event Loop
07:08
24
2.4. Clustering in Theory
05:12
25
2.5. Forking Children
05:38
26
2.6. Clustering in Action
05:34
27
2.7. Benchmarking Server Performance
05:17
28
2.8. Benchmark Refactor
03:56
29
2.9. Need More Children!
16:43
30
2.10. PM2 Installation
02:54
31
2.11. PM2 Configuration
06:50
32
2.13. Webworker Threads
02:28
33
2.14. Worker Threads in Action
11:35
34
2.15. Benchmarking Workers
05:18
35
3.1. The Next Phase
02:13
36
3.3. Project Walkthrough
05:52
37
3.4. Key Customization
03:08
38
3.6. MongoDB Creation
06:24
39
3.7. Routes Walkthrough
04:19
40
4.1. MongoDB Query Performance
10:43
41
4.2. Query Caching Layer
07:56
42
4.3. Redis Introduction
03:23
43
4.4. Installing Redis on MacOS
03:20
44
4.6. Getting and Setting Basic Values
06:48
45
4.7. Redis Hashes
06:58
46
4.8. One Redis Gotcha
02:54
47
4.9. Cache Keys
07:48
48
4.10. Promisifying a Function
08:08
49
4.11. Caching in Action
08:00
50
4.12. Caching Issues
05:27
51
4.13. The Ultimate Caching Solution
21:00
52
4.14. Patching Mongoose's Exec
10:43
53
4.15. Restoring Blog Routes Handler
02:06
54
4.16. Unique Keys
06:01
55
4.17. Key Creation
03:10
56
4.18. Restoring Redis Config
01:28
57
4.19. Cache Implementation
04:28
58
4.20. Resolving Values
05:47
59
4.21. Hydrating Models
06:26
60
4.22. Hydrating Arrays
03:28
61
4.23. Toggleable Cache
08:42
62
4.24. Cache Expiration
02:31
63
4.25. Forced Cache Expiration
05:16
64
4.26. Nested Hashes
06:47
65
4.27. Clearing Nested hashes
04:37
66
4.28. Automated Cache Clearing with Middlware
06:40
67
5.1. Testing Flow
06:39
68
5.2. Testing Challenges
03:26
69
5.3. Commands Around Testing
03:14
70
5.4. First Jest Test
04:27
71
5.5. Launching Chromium Instances
09:51
72
5.6. Chromium Navigation
04:32
73
5.7. Extracting Page Content
05:04
74
5.8. Puppeteer - Behind the Scenes
04:45
75
5.9. DRY Tests
03:24
76
5.10. Browser Termination
01:35
77
5.11. Asserting OAuth Flow
07:30
78
5.12. Asserting URL Domain
03:01
79
5.13. Issues with OAuth
05:12
80
5.14. Solving Authentication Issues with Automation Testing
04:37
81
5.15. The Google OAuth Flow
07:17
82
5.16. Inner Workings of Sessions
12:07
83
5.17. Sessions From Another Angle
08:23
84
5.18. Session Signatures
11:34
85
5.19. Generating Sessions and Signatures
09:04
86
5.20. Assembling the Pieces
08:08
87
5.21. WaitFor Statements
09:18
88
5.22. Factory Functions
05:00
89
5.23. The Session Factory
08:49
90
5.24. Assembling the Session Factory
03:04
91
5.25. Code Separation
06:23
92
5.27. Global Jest Setup
07:01
93
5.28. Testing Factory Tests!
03:42
94
5.29. Adding a Login Method
05:02
95
5.30. Extending Page
07:59
96
5.31. Introduction to Proxies
07:47
97
5.32. Proxies in Action
12:11
98
5.33. Combining Object Property Access
08:18
99
5.34. Combining the Page and Browser
08:38
100
5.35. Custom Page Implementation
04:17
101
5.36. Function Lookup Priority
04:27
102
5.37. Gee, I Hope This Works!
05:33
103
5.38. Reusable Functions on Page
05:39
104
5.39. Testing Blog Creation
04:54
105
5.40. Default Navigation
05:31
106
5.41. Asserting Form Display
06:00
107
5.42. Test Timeout
05:24
108
5.43. Common Test Setup
05:08
109
5.44. Nested Describes for Structure
07:01
110
5.45. Asserting Validation Errors
07:40
111
5.46. Asserting Form Confirmation
06:26
112
5.47. Asserting Blog Creation
05:58
113
5.48. Options for Testing Prohibited Actions
03:33
114
5.49. Direct API Requests
11:45
115
5.50. Executed Arbitrary JS in Chromium
03:55
116
5.51. Asserting Page Response
07:25
117
5.52. Get Restrictions
02:45
118
5.53. A Final 'GET' Test
02:57
119
5.54. Super Advanced Test Helpers
31:46
120
6.1. Introduction to CI
07:25
121
6.2. CI Providers
06:22
122
6.3. The Basics of YAML Files
04:23
123
6.5. Travis YAML Setup
10:05
124
6.6. More Travis YAML
05:09
125
6.7. Client Builds
06:38
126
6.8. Script Config
06:19
127
6.9. Using Travis Documentation
05:45
128
6.10. More Server Configuration
13:27
129
6.12. A Touch More Configuration
03:12
130
6.13. Git Repo Setup
04:19
131
6.14. Travis CI Setup
02:16
132
6.15. Triggering CI Builds
02:49
133
6.16. Build Success
01:19
134
7.1. Image Upload
02:16
135
7.2. Big Issues Around Image Upload
04:41
136
7.3. Alternate Image Upload
03:34
137
7.4. Chosen Storage Solution
04:18
138
7.5. Upload Constraints
04:27
139
7.6. Image File Transport
06:05
140
7.7. Upload Flow with AWS S3
05:23
141
7.8. Details of the Presigned URL
06:48
142
7.9. Security Issues Solved with Presigned URL's
04:16
143
7.10. Adding an Image Picker
03:31
144
7.11. Handling File Changes
04:40
145
7.12. Recording Image Files
04:39
146
7.13. The SubmitBlog Function
03:08
147
7.14. AWS Credentials with IAM
05:09
148
7.15. Creating S3 Buckets
03:17
149
7.16. Allowing Actions with IAM Policies
08:18
150
7.17. Creating IAM Users
04:42
151
7.18. Upload Routes Files
05:15
152
7.20. Configuring the AWS SDK
03:19
153
7.21. GetSignedURL Arguments
10:07
154
7.22. Calling GetSignedURL
09:36
155
7.23. Viewing the Signed URL
02:18
156
7.24. Attempting Image Upload
08:00
157
7.26. Handling CORS Errors
05:21
158
7.27. Outstanding Issues
01:40
159
7.28. S3 Bucket Policies
05:02
160
7.29. Tying Uploads to Blogs
04:19
161
7.30. Ensuring Images get Tied
02:02
162
7.31. Displaying Images
04:07

Unlock unlimited learning

Get instant access to all 161 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Comments

0 comments

Want to join the conversation?

Sign in to comment

Similar courses

React, Angular, Node In-Depth Guide: Beginner to Pro

React, Angular, Node In-Depth Guide: Beginner to Pro

Sources: udemy
If you are planning to start your career as a developer or you just want to improve your programming skills, then this course is right for you. Get all you need to start web dev...
80 hours 1 minute 57 seconds
The Node.js Master Class - No Frameworks, No NPM | Node v8.x

The Node.js Master Class - No Frameworks, No NPM | Node v8.x

Sources: udemy
Node as it was intended: Build a REST API, a web app GUI, and a CLI in plain javascript with no 3rd-party libraries.
15 hours 24 minutes 23 seconds
Build a Full-Stack Chrome Extension with NodeJS and MongoDB

Build a Full-Stack Chrome Extension with NodeJS and MongoDB

Sources: udemy
In this course, we'll be developing a new Full-Stack Chrome Extension that Scrapes Amazon, and automatically saves Product Data within a MongoDB Database. Our f
6 hours 15 minutes 12 seconds
Node.js Graceful Termination

Node.js Graceful Termination

Sources: Michael Guay
Learn to properly terminate processes in Node.js within a Kubernetes environment. This is key to stable deployments and efficient scaling without downtime.
30 minutes 50 seconds