4.75 sur 5
4.75

Microservices with Node JS and React

Build, deploy, and scale an E-Commerce app using Microservices built with Node, React, Docker and Kubernetes
Architect large, scalable apps using a collection of microservices
Deploy a multi-service app to the cloud with Docker and Kubernetes
Solve concurrency issues in a distributed systems environment
Leverage your Javascript skills to build a complex web app
Build a Server-Side Rendered React App to render data from your microservices
Understand how enterprise companies design their infrastructure
Share reusable code between multiple Express servers using custom NPM packages
Write comprehensive tests to ensure each service works as designed
Communicate data between services using a lightning-fast event bus
Write nothing but production-level code. No cutting corners!

Event-Based Architecture? Covered! Server side rendering with React? Yep.  Scalable, production-ready code? Its here!

Microservices are the number one solution for building and scaling out apps that are intended to grow.  Just one little issue: there are few resources online that delve into the most complex and nasty issues around them!  I built this course to fix that.  This course tackles every major issues around microservices head on. From challenges with data replication to confusing unordered event streams, every major challenge of building microservices is covered. 

Beyond focusing on the basics of microservices, this course is a perfect introduction to the world of full-stack development.  You will work all the way from the frontend, assembling a React app using Hooks, to the backend, including database design and deployment strategies.  Every step along the way is covered in tremendous detail, with ample diagrams to ensure every step is crystal clear.

Many other resources show only the easiest, simplest apps written with microservices.  This course does the opposite: we focus on the most challenging aspects of microservices, challenges that you will likely encounter every single day.  You will see these difficulties first hand, then solve them with easy-to-understand strategies.

——————-

How This Course Works

This course doesn’t focus on using an off-the-shelf microservices framework. Many exist, but they hide the inner workings and challenges of microservices away from you. Instead, we will be using a minimal number of libraries, and write as much custom code as possible. This will expose you to challenging problems and clever solutions when handling subjects like async events!

What Technology You’ll Use

Because we are building a full stack application, we will use a variety of technologies. On the frontend, we’ll use React and Next JS to present content to users. Each service is created using Node and Express. Data for each service is held in either a Mongo database or Redis. The entire app is deployed and runs in Docker containers executed in a Kubernetes cluster. Finally, almost all of the code in this course is written with Typescript.

This is a scary list of technologies! Not familiar with some of these? No problem! The course is built assuming that you only know the basics of Javascript and Express. No other knowledge is needed – you will learn everything you need to know.

What You’ll Be Able to Do

By the time you complete this course, you will be able to:

  • Architect a multi-service application

  • Determine whether your app is a good fit for a microservices approach

  • Understand and solve the challenges in async, event-based communication between services

  • Use Docker and Kubernetes to deploy a multi-service app to any cloud provider

  • Organize and enhance the reusability of code in large projects

What You’ll Learn

An absolute incredible number of topics are covered in this course.  Here is a partial list of what you’ll do:

  • Practice patterns to create scalable microservices for a variety of app domains

  • Build a Server-Side-Rendered React app using Hooks and Next JS

  • Write a custom implementation of an event bus

  • Optionally, run a development environment through a cloud provider

  • Guarantee consistently structured responses from your different API’s

  • See best practices in communication between different services

  • Configure and scale your services using Kubernetes Deployments

  • Document and enforce structure constraints on events shared across microservices

  • Limit access to your APIs using JWT-based authentication

  • And much more!

This is the course I wish I had when I was learning microservices. A course that focuses on the hardest parts, gives clear explanations, and discusses the pros and cons of different design options. Sign up today and join me in mastering microservices!

Fundamental Ideas Around Microservices

1
How to Get Help
2
Join Our Community!
3
Course Resources
4
What Is a Microservice?
5
Data in Microservices
6
Quiz - Data in Microservices
7
Big Problems with Data
8
Sync Communication Between Services
9
Event-Based Communication
10
A Crazy Way of Storing Data
11
Pros and Cons of Async Communication

A Mini-Microservices App

1
App Overview
2
Project Setup
3
Posts Service Creation
4
Testing the Posts Service
5
Implementing a Comments Service
6
Quick Comments Test
7
Note on the React App
8
Suggestion Regarding a Default Export Warning
9
React Project Setup
10
Building Post Submission
11
Handling CORS Errors
12
Fetching and Rendering Posts
13
Creating Comments
14
Displaying Comments
15
Completed React App
16
Request Minimization Strategies
17
An Async Solution
18
Common Questions Around Async Events
19
Event Bus Overview
20
Important Note about Node v15 and Unhandled Promise Rejections
21
A Basic Event Bus Implementation
22
Emitting Events
23
Emitting Comment Creation Events
24
Receiving Events
25
Creating the Data Query Service
26
Parsing Incoming Events
27
Using the Query Service
28
Adding a Simple Feature
29
Issues with Comment Filtering
30
A Second Approach
31
How to Handle Resource Updates
32
Creating the Moderation Service
33
Adding Comment Moderation
34
Reminder about Node v15 and Error Catching
35
Handling Moderation
36
Updating Comment Content
37
A Quick Test
38
Rendering Comments by Status
39
Dealing with Missing Events
40
Required Node v15+ Update for Query Service
41
Implementing Event Sync
42
Event Syncing in Action

Running Services with Docker

1
Deployment Issues
2
Why Docker?
3
Why Kubernetes?
4
Don't Know Docker? Watch This.
5
Note About Docker Build Output and Buildkit
6
Dockerizing the Posts Service
7
Review Some Basic Commands
8
Dockering Other Services

Orchestrating Collections of Services with Kubernetes

1
Installing Kubernetes
2
IMPORTANT Note for Minikube and MicroK8s Users
3
A Kubernetes Tour
4
Important Kubernetes Terminology
5
Notes on Config Files
6
Creating a Pod
7
ErrImagePull, ErrImageNeverPull and ImagePullBackoff Errors
8
Understanding a Pod Spec
9
Common Kubectl Commands
10
A Time-Saving Alias
11
Introducing Deployments
12
Creating a Deployment
13
Common Commands Around Deployments
14
Updating Deployments
15
Preferred Method for Updating Deployments
16
Networking With Services
17
Creating a NodePort Service
18
Accessing NodePort Services
19
Setting Up Cluster IP Services
20
Building a Deployment for the Event Bus
21
Adding ClusterIP Services
22
How to Communicate Between Services
23
Updating Service Addresses
24
Verifying Communication
25
Adding Query, Moderation and Comments
26
Testing Communication
27
Load Balancer Services
28
Load Balancers and Ingress
29
Update on Ingress Nginx Mandatory Commands
30
Installing Ingress-Nginx
31
Ingress - networking.k8s.io/v1beta1 Ingress is deprecated
32
Writing Ingress Config Files
33
Important Note About Port 80
34
Hosts File Tweak
35
Important Note to Add Environment Variable
36
Deploying the React App
37
Unique Route Paths
38
Final Route Config
39
Introducing Skaffold
40
Skaffold Setup
41
First Time Skaffold Startup
42
A Few Notes on Skaffold

Architecture of Multi-Service Apps

1
Big Ticket Items
2
App Overview
3
Resource Types
4
Service Types
5
Events and Architecture Design
6
Note on Typescript
7
Auth Service Setup
8
Auth K8s Setup
9
Adding Skaffold
10
Note on Code Reloading
11
Ingress - networking.k8s.io/v1beta1 Ingress is deprecated
12
Ingress-Nginx Setup
13
Hosts File and Security Warning

Leveraging a Cloud Environment for Development

1
Note on Remote Development
2
Remote Dev with Skaffold
3
Google Cloud Initial Setup
4
Kubernetes Cluster Creation
5
Kubectl Contexts
6
Initializing the GCloud SDK
7
Installing the GCloud Context
8
Updating the Skaffold Config
9
More Skaffold Updates
10
Creating a Load Balancer
11
Final Config and Test

Response Normalization Strategies

1
Creating Route Handlers
2
Scaffolding Routes
3
Adding Validation
4
Handling Validation Errors
5
Postman HTTPS Issues
6
Surprising Complexity Around Errors
7
Other Sources of Errors
8
Solution for Error Handling
9
Building an Error Handling Middleware
10
Communicating More Info to the Error Handler
11
Encoding More Information In an Error
12
Subclassing for Custom Errors
13
Determining Error Type
14
Converting Errors to Responses
15
Moving Logic Into Errors
16
Verifying Our Custom Errors
17
Final Error Related Code
18
How to Define New Custom Errors
19
Uh Oh... Async Error Handling

Database Management and Modeling

1
Creating Databases in Kubernetes
2
Connecting to MongoDB
3
Understanding the Signup Flow
4
Getting TypeScript and Mongoose to Cooperate
5
Creating the User Model
6
Type Checking User Properties
7
Adding Static Properties to a Model
8
Defining Extra Document Properties
9
What's That Angle Bracket For?
10
User Creation
11
Proper Error Handling
12
Note on Password Hashing
13
Reminder on Password Hashing
14
Adding Password Hashing
15
Comparing Hashed Password
16
Mongoose Pre-Save Hooks

Authentication Strategies and Options

1
Fundamental Authentication Strategies
2
Huge Issues with Authentication Strategies
3
So Which Option?
4
Solving Issues with Option #2
5
Reminder on Cookies vs JWT's
6
Microservices Auth Requirements
7
Issues with JWT's and Server Side Rendering
8
Cookies and Encryption
9
Adding Session Support
10
Generating a JWT
11
JWT Signing Keys
12
Securely Storing Secrets with Kubernetes
13
Creating and Accessing Secrets
14
Accessing Env Variables in a Pod
15
Common Response Properties
16
Formatting JSON Properties
17
The Signin Flow
18
Common Request Validation Middleware
19
Sign In Logic
20
Quick Sign In Test
21
Current User Handler
22
Returning the Current User
23
Signing Out
24
Creating a Current User Middleware
25
Augmenting Type Definitions
26
Requiring Auth for Route Access

Testing Isolated Microservices

1
Scope of Testing
2
Testing Goals
3
Testing Architecture
4
Index to App Refactor
5
A Few Dependencies
6
Test Environment Setup
7
Our First Test
8
An Important Note
9
Testing Invalid Input
10
Requiring Unique Emails
11
Changing Node Env During Tests
12
Tests Around Sign In Functionality
13
Testing Sign Out
14
Issues with Cookies During Testing
15
Easy Auth Solution
16
Auth Helper Function
17
Testing Non-Authed Requests

Integrating a Server-Side-Rendered React App

1
Starting the React App
2
Reminder on Server Side Rendering
3
Suggestion Regarding a Default Export Warning
4
Basics of Next JS
5
Building a Next Image
6
Running Next in Kubernetes
7
Note on File Change Detection
8
Adding Global CSS
9
Adding a Sign Up Form
10
Handling Email and Password Inputs
11
Successful Account Signup
12
Handling Validation Errors
13
The useRequest Hook
14
Using the useRequest Hook
15
An onSuccess Callback
16
Overview on Server Side Rendering
17
A note about ECONNREFUSED errors
18
Fetching Data During SSR
19
Why the Error?
20
Two Possible Solutions
21
Cross Namespace Service Communication
22
When is GetInitialProps Called?
23
On the Server or the Browser
24
Ingress-Nginx Namespace and Service - Important Update
25
Specifying the Host
26
Passing Through the Cookies
27
A Reusable API Client
28
Content on the Landing Page
29
The Sign In Form
30
A Reusable Header
31
Moving GetInitialProps
32
Issues with Custom App GetInitialProps
33
Handling Multiple GetInitialProps
34
Passing Props Through
35
Building the Header
36
Conditionally Showing Links
37
Signing Out
38
React App Catchup

Code Sharing and Reuse Between Services

1
Shared Logic Between Services
2
Options for Code Sharing
3
NPM Organizations
4
Publishing NPM Modules
5
Project Setup
6
An Easy Publish Command
7
Relocating Shared Code
8
Updating Import Statements
9
Updating the Common Module

Create-Read-Update-Destroy Server Setup

1
Ticketing Service Overview
2
Project Setup
3
Running the Ticket Service
4
Mongo Connection URI
5
Quick Auth Update
6
Test-First Approach
7
Creating the Router
8
Adding Auth Protection
9
Faking Authentication During Tests
10
Building a Session
11
Testing Request Validation
12
Validating Title and Price
13
Reminder on Mongoose with TypeScript
14
Defining the Ticket Model
15
Creation via Route Handler
16
Testing Show Routes
17
Unexpected Failure!
18
What's that Error?!
19
Better Error Logging
20
Complete Index Route Implementation
21
Ticket Updating
22
Handling Updates
23
Permission Checking
24
Final Update Changes
25
Manual Testing

NATS Streaming Server - An Event Bus Implementation

1
What Now?
2
Three Important Items
3
Creating a NATS Streaming Deployment
4
Big Notes on NATS Streaming
5
Building a NATS Test Project
6
Port-Forwarding with Kubectl
7
Publishing Events
8
Small Required Command Change
9
Listening For Data
10
Accessing Event Data
11
Client ID Generation
12
Queue Groups
13
Manual Ack Mode
14
Client Health Checks
15
Graceful Client Shutdown
16
Core Concurrency Issues
17
Common Questions
18
[Optional] More Possible Concurrency Solutions
19
Solving Concurrency Issues
20
Concurrency Control with the Tickets App
21
Event Redelivery
22
Durable Subscriptions

Connecting to NATS in a Node JS World

1
Reusable NATS Listeners
2
The Listener Abstract Class
3
Extending the Listener
4
Quick Refactor
5
Leveraging TypeScript for Listener Validation
6
Subjects Enum
7
Custom Event Interface
8
Enforcing Listener Subjects
9
Quick Note: 'readonly' in Typescript
10
Enforcing Data Types
11
Where Does this Get Used?
12
Custom Publisher
13
Using the Custom Publisher
14
Awaiting Event Publication
15
Common Event Definitions Summary
16
Updating the Common Module
17
Restarting NATS

Managing a NATS Client

1
Publishing Ticket Creation
2
More on Publishing
3
NATS Client Singleton
4
Remember Mongoose?
5
TS Error - Did you forget to include 'void' in your type argument
6
Singleton Implementation
7
Accessing the NATS Client
8
Graceful Shutdown
9
Successful Listen!
10
Ticket Update Publishing
11
Failed Event Publishing
12
Handling Publish Failures
13
Fixing a Few Tests
14
Redirecting Imports
15
Providing a Mock Implementation
16
Test-Suite Wide Mocks
17
Ensuring Mock Invocations
18
NATS Env Variables

Cross-Service Data Replication In Action

1
The Orders Service
2
Scaffolding the Orders Service
3
A Touch More Setup
4
Ingress Routing Rules
5
Scaffolding a Few Route Handlers
6
Subtle Service Coupling
7
Associating Orders and Tickets
8
Order Model Setup
9
The Need for an Enum
10
Creating an Order Status Enum
11
More on Mongoose Refs
12
Defining the Ticket Model
13
Order Creation Logic
14
Finding Reserved Tickets
15
Convenience Document Methods
16
Order Expiration Times
17
Test Suite Setup
18
Asserting Tickets Exist
19
Asserting Reserved Tickets
20
Testing the Success Case
21
Fetching a User's Orders
22
A Slightly Complicated Test
23
Fetching Individual Orders
24
Does Fetching Work?
25
Cancelling an Order
26
Can We Cancel?

Understanding Event Flow

1
Orders Service Events
2
Creating the Events
3
Implementing the Publishers
4
Publishing the Order Creation
5
Publishing Order Cancellation
6
Testing Event Publishing

Listening for Events and Handling Concurrency Issues

1
Time for Listeners!
2
Reminder on Listeners
3
Blueprint for Listeners
4
A Few More Reminders
5
Simple onMessage Implementation
6
ID Adjustment
7
Ticket Updated Listener Implementation
8
Initializing the Listeners
9
A Quick Manual Test
10
Clear Concurrency Issues
11
Reminder on Versioning Records
12
Optimistic Concurrency Control
13
Mongoose Update-If-Current
14
Implementing OCC with Mongoose
15
Testing OCC
16
One More Test
17
Who Updates Versions?
18
Including Versions in Events
19
Updating Tickets Event Definitions
20
Applying a Version Query
21
Did it Work?
22
Abstracted Query Method
23
[Optional] Versioning Without Update-If-Current
24
Testing Listeners
25
A Complete Listener Test
26
Testing the Ack Call
27
Testing the Ticket Updated Listener
28
Success Case Testing
29
Out-Of-Order Events
30
The Next Few Videos
31
Fixing a Few Tests
32
Listeners in the Tickets Service
33
Building the Listener
34
Strategies for Locking a Ticket
35
Reserving a Ticket
36
Setup for Testing Reservation
37
Test Implementation
38
Missing Update Event
39
Private vs Protected Properties
40
Publishing While Listening
41
Mock Function Arguments
42
Order Cancelled Listener
43
A Lightning-Quick Test
44
Don't Forget to Listen!
45
Rejecting Edits of Reserved Tickets

Worker Services

1
The Expiration Service
2
Expiration Options
3
Initial Setup
4
A Touch of Kubernetes Setup
5
File Sync Setup
6
Listener Creation
7
What's Bull All About?
8
Creating a Queue
9
Queueing a Job on Event Arrival
10
Testing Job Processing
11
Delaying Job Processing
12
Defining the Expiration Complete Event
13
Publishing an Event on Job Processing
14
Handling an Expiration Event
15
Emitting the Order Cancelled Event
16
Testing the Expiration Complete Listener
17
A Touch More Testing
18
Listening for Expiration
19
Don't Cancel Completed Orders!

Handling Payments

1
The Payments Service
2
Initial Setup
3
Replicated Fields
4
Another Order Model!
5
Update-If-Current
6
Replicating Orders
7
Testing Order Creation
8
Marking an Order as Cancelled
9
Cancelled Testing
10
Starting the Listeners
11
Payments Flow with Stripe
12
Implementing the Create Charge Handler
13
Validating Order Payment
14
Testing Order Validation Before Payment
15
Testing Same-User Validation
16
Stripe Setup
17
Creating a Stripe Secret
18
Creating a Charge with Stripe
19
Manual Testing of Payments
20
Automated Payment Testing
21
Mocked Stripe Client
22
A More Realistic Test Setup
23
Realistic Test Implementation
24
Tying an Order and Charge Together
25
Testing Payment Creation
26
Publishing a Payment Created Event
27
More on Publishing
28
Marking an Order as Complete

Back to the Client

1
A Few More Pages
2
Reminder on Data Fetching with Next
3
Two Quick Fixes
4
Scaffolding a Form
5
Sanitizing Price Input
6
Ticket Creation
7
Listing All Tickets
8
Linking to Wildcard Routes
9
Creating an Order
10
Programmatic Navigation to Wildcard Routes
11
The Expiration Timer
12
Displaying the Expiration
13
Showing a Stripe Payment Form
14
Configuring Stripe
15
Test Credit Card Numbers
16
Paying for an Order
17
Filtering Reserved Tickets
18
Header Links
19
Rendering a List of Orders

CI/CD

You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.8
4.8 sur 5
Notes7196

Détails des Notes

Étoiles 5
5424
Étoiles 4
1451
Étoiles 3
255
Étoiles 2
36
Étoiles 1
30
5615c65527f07ffc3eaa4716b4d96e0a
Garantie de remboursement de 30 jours

Inclut

54 heures de vidéo à la demande
Accès complet à vie
Accès sur le mobile et la télévision
Certificat d'achèvement

Archive

Working hours

Monday 9:30 am - 6.00 pm
Tuesday 9:30 am - 6.00 pm
Wednesday 9:30 am - 6.00 pm
Thursday 9:30 am - 6.00 pm
Friday 9:30 am - 5.00 pm
Saturday Closed
Sunday Closed