.NET Core Microservices
3.7 (925 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
3,987 students enrolled

.NET Core Microservices

Build distributed system using microservices architecture
3.7 (926 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
3,988 students enrolled
Created by Packt Publishing
Last updated 10/2019
English
English [Auto-generated], Italian [Auto-generated]
Current price: $86.99 Original price: $124.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 4 hours on-demand video
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Use NET Core platform to build a microservices architecture
  • Send messages through distributed system with the RabbitMQ service bus
  • Store data in the NoSQL database, MongoDB
  • Store user identities and authenticating requests using JWT
  • Deploy the application to the cloud with Docker and Docker Compose
  • Explore commands, events, handlers and other design patterns
  • Delve into unit- and integration-testing the distributed system
Course content
Expand all 34 lectures 03:59:03
+ System Architecture
5 lectures 25:36

This video provides an overview of the entire course.

Preview 03:47

In this video, you will get introduced to the idea behind microservices and the application we are going to build.

  • Learn about the microservices in general
  • Discuss the application we will build
  • Know why the microservices might be a good choice 
What Are We Going to Build?
05:27

In this video, you will get introduced to the IDE and tools required for creating the application.

  • Get introduced to the available IDEs
  • Get introduced to introduce the required tools
  • Explore the way that we will follow to build application 
Setting up the Environment
02:57

In this video, we will discuss the architecture of the system that we are going to build.

  • Get introduced to the typical monolith architecture
  • Get introduced to introduce the microservices architecture
  • Know why microservices architecture will be a good choice 
Discussing System Architecture
07:15

In this video, we will create a new solution and projects using dotnet CLI, discuss the system layers.

  • Create a new solution
  • Create projects and add required references
  • Discuss the system layers 
Creating Solution
06:10

Now that you are done with the videos of section 1, let’s assess your learning. Here, are a few questions, followed by 4 options, out of which 1 is the correct option. Select the right option and validate your learning!

System architecture
2 questions
+ Messaging
6 lectures 55:34

This video will introduce the concept of service bus, describe RabbitMQ and configure it on local machine.

  • Get introduced to the concept of service bus
  • Describe the RabbitMQ
  • Discuss how to configure RabbitMQ on local machine 
Preview 04:57

This video will introduce the commands and command pattern.

  • Define the ICommand interface
  • Create commands used in the application
  • Discuss the command handler pattern 
Creating Commands
05:25

This video will introduce the events and event pattern.

  • Define the IEvent interface
  • Create events used in the application
  • Discuss the event handler pattern 
Creating Events
09:11

In this video, we will create service host using Fluent API, implement custom extensions and helper classes.

  • Discuss the idea behind custom helper classes
  • Implement the service host using Fluent API
  • Create custom extension methods 
Implementing Helper Classes and Methods
15:38

In this video, we will describe the API gateway, configure required services, and define endpoints.

  • Describe the API gateway
  • Configure the required services
  • Add endpoints and send message to the service bus 
Implementing API Endpoints
05:23

In this video, we will discuss about the required command and event handlers, subscribe to the incoming messages, and implement basic handlers.

  • Discuss about the required command and event handlers
  • Subscribe to the incoming messages
  • Implement basic command and event handlers 
Subscribing to the Messages
15:00

Now that you are done with the videos of section 2, let’s assess your learning. Here, are a few questions, followed by 4 options, out of which 1 is the correct option. Se- lect the right option and validate your learning!

Messaging
2 questions
+ The Activities Service
5 lectures 42:55

In this video, we will discuss the domain of the services and create the entities and interfaces.

  • Discuss the domain of the activities service
  • Create the entities
  • Create the repository interfaces 
Creating Domain Models
05:56

In this video, we will introduce the MongoDB NoSQL database and configure the connection.

  • Describe MongoDB database
  • Configure the connection
  • Create database initialiser 
Setting up MongoDB
12:44

In this video, we will implement the repositories using MongoDB and create the database seeder for initializing data.

  • Implement the MongoDB repositories
  • Implement the database data seeder
  • Verify the initialized data 
Implementing Repositories
13:03

In this video, we will discuss the business logic of the activities service, implement the services and custom exceptions.

  • Discuss the business logic
  • Implement the application services
  • Implement custom exceptions 
Creating Application Services
05:40

In this video, we will implement the required message handlers for the activities service and deal with the exceptions.

  • Implement the command handlers
  • Handle the exceptions within handlers
  • Verify the handlers implementation 
Implementing Handlers
05:32

Now that you are done with the videos of section 3, let’s assess your learning. Here, are a few questions, followed by 4 options, out of which 1 is the correct option. Se- lect the right option and validate your learning!

The Activities Service
2 questions
+ The Identity Service
4 lectures 23:06

In this video, we will discuss the domain model of user and the user repository, implement the required classes and interfaces.

  • Discuss the domain model of the user service
  • Implement user entity
  • Create interface for the user repository 
Preview 04:31

In this video, we will discuss the possible encryption methods, implement the logic for hashing passwords.

  • Discuss the possible encryption methods
  • Implement the hashing password logic
  • Update the user entity 
Hashing Passwords
05:45

In this video, we will implement the repository for storing the user data in MongoDB.

  • Configure the MongoDB connection
  • Implement the user repository
  • Setup the required services in application container 
Storing User Data
03:47

In this video, we will discuss the registration and logging in methods, implement the business logic.

  • Discuss the registration and logging in methods
  • Implement the business logic for registration
  • Implement the business logic for logging in 
Registering and Logging In
09:03

Now that you are done with the videos of section 4, let’s assess your learning. Here, are a few questions, followed by 4 options, out of which 1 is the correct option. Se- lect the right option and validate your learning!

The Identity Service
2 questions
+ Using JSON Web Tokens
3 lectures 23:02

In this video, we will introduce the JSON Web Tokens, describe how it works, install .NET Core library.

  • Introduce the JSON Web Tokens
  • Describe how JWT does work
  • Install library to use JWT with .NET Core 
JSON Web Tokens
05:15

In this video, we will describe the different options for JWT signature, implement JWT with HMAC.

  • Describe the different options for JWT signature
  • Create JWT options class
  • Implement JWT with HMAC 
Implementing JWT with HMAC
07:43

In this video, we will refactor the login method in user service, return the token to the user and add JWT middleware to the API.

  • Refactor the login method in user service
  • Return the token to the user
  • Add JWT middleware to the API 
Authenticating the User
10:04

Now that you are done with the videos of section 5, let’s assess your learning. Here, are a few questions, followed by 4 options, out of which 1 is the correct option. Se- lect the right option and validate your learning!

Using JSON Web Tokens
2 questions
+ Finalizing the API Gateway
4 lectures 23:09

In this video, we will discuss and implement the event handlers used by the API.

  • Discuss the handlers required by the API
  • Implement the handlers
  • Describe the other possible implementations of the handlers 
Preview 03:44

In this video, we will implement the data storage using repository and MongoDB database, introduce the concept of flattened objects.

  • Create the models using "flattened" objects pattern
  • Define the repository interface
  • Implement the repository using MongoDB 
Storing the Data
08:24

In this video, we will create the application services for the API, refactor the controllers and endpoints.

  • Implement the application services
  • Refactor the API controllers
  • Verify the API endpoints 
Refactoring Endpoints
05:16

In this video, we will use tools such as Postman and cURL to invoke the API endpoints.

  • Execute HTTP requests with cURL
  • Execute HTTP requests with Postman
  • Discuss the other possible API endpoints 
Executing HTTP Requests
05:45

Now that you are done with the videos of section 6, let’s assess your learning. Here, are a few questions, followed by 4 options, out of which 1 is the correct option. Se- lect the right option and validate your learning!

Finalizing the API gateway
2 questions
+ System Testing
3 lectures 22:21

In this video, we will be testing the API controllers.

  • Create unit test for Home Controller
  • Create unit test for Activities Controller
  • Discuss the possible integration test 
API Testing
07:50

In this video, we will be testing the Activities Service.

  • Create unit test for activity service
  • Introduce mocking with Mom library
  • Create integration test using TestServer tool 
Activities Service Testing
07:12

In this video, we will be testing the Identity Service.

  • Create the unit test for User Service
  • Initialize the test data using Moq
  • Verify that returned token is valid 
Identity Service Testing
07:19

Now that you are done with the videos of section 7, let’s assess your learning. Here, are a few questions, followed by 4 options, out of which 1 is the correct option. Se- lect the right option and validate your learning!

System testing
2 questions
+ Dockerizing and Deploying the Application
4 lectures 23:20

In this video, you will be introduced Docker.

  • Introduce the Docker
  • Create the Dockerfile
  • Build and run the Docker image for API 
Running Services Using Docker
06:52

In this video, you will be introduced to the Docker Compose, the compose file and run the services using this tool.

  • Introduce Docker Compose
  • Discusss the docker-compose.yaml file
  • Run the services using Docker Compose 
Using Docker Compose
05:14

In this video, we will introduce Docker Hub, tag Docker images and push them to the Hub.

  • Introduce Docker Hub
  • Tag Docker images
  • Push Docker images to the Docker Hub 
Storing Docker Images in a Hub
02:45

In this video, we will deploy application to the VM in the Cloud, run services using Docker Compose, and configure Nginx HTTP Server.

  • Deploy application to the VM
  • Run services using Docker Compose
  • Configure Nginx HTTP Server 
Deploying Application to the Cloud
08:29

Now that you are done with the videos of section 8, let’s assess your learning. Here, are a few questions, followed by 4 options, out of which 1 is the correct option. Se- lect the right option and validate your learning!

“Dockerizing” and deploying the application
2 questions
Requirements
  • Should have knowledge in .NET Core.
Description

Microservices are an architectural style that promotes the development of complex applications as a suite of small services based on business capabilities. This course will help you identify the appropriate service boundaries within the business.

We'll start by looking at what microservices are, and their main characteristics. We will develop a basic distributed system using the microservice architecture and tools such as RabbitMQ service bus, to send messages across the separated services, or MongoDB, which is a NoSQL database. Within the course, we will focus on creating the HTTP API to act as a gateway to the whole system and so-called Activities Service, responsible for handling the incoming messages (or actually the commands that will be distributed through the services bus). We'll also implement the Identity Service, which will serve JSON Web Tokens (JWT) to authenticate requests incoming to the API. Our application will let the user store information about the activities performed at a given date for a selected category, for example, work, tasks, sport, and so on.

Once the request to save the activity is published within the system, the Activities Service will handle the business logic and decide whether the activity is valid, which will eventually result in publishing the event about processing the successful or rejected activity. In the course, you will also learn about commands and events as well as handlers which is one of the most popular design patterns when it comes to creating distributed systems.

By the end of the course, your services will be built using ASP.NET Core framework and later on, you will use tools such as Docker and Docker Compose to pack your application into the container and deploy it to the virtual machine running in the cloud.

About The Author

Born and raised in Kraków, Piotr holds an M.Sc.Eng. degree in Applied Informatics. He has over 7 years' experience as software engineer and architect but is also interested in topics such as DevOps. He is a co-founder of the Noordwind teal organization and is a full stack developer working mainly with C#, .NET, .NET Core, and JavaScript technologies. He's also a big fan of DDD, CQRS, RESTful APIs, and distributed systems using the microservices pattern. Piotr is a well-known member of the Polish .NET community and his mission is to deliver the best content possible in terms of free and open software as well as programming courses. On top of that, he's an active open source contributor, consultant, blogger, public speaker, mentor, lecturer and co-organizer of the .NET Core Tour. In any spare time he enjoys lifting weights, running, and riding a motorcycle.

Who this course is for:
  • This video course is for .NET Core developers who want to learn and understand the microservice architecture and implement it in their .NET Core applications. It's ideal for developers who are completely new to microservices or have just a theoretical understanding of this architectural approach and want to gain a practical perspective in order to better manage application complexity.