Is your team suffering the symptoms of the monolithic hell? Are you wondering if a microservices architecture is the right fit for your .NET project? Have you been asked to implement microservices and you don’t know where to start? Are you just curious about this trendy new term? In this course you will learn why you may want to embrace a microservices architecture and how to get started by using the .NET platform.
You will learn the foundational elements of microservices by incrementally building a real microservices based application with .NET 5, step by step. The first two microservices of this application are built in this course, each storing their data in a Docker hosted MongoDB database and both communicating asynchronously via a RabbitMQ message broker and MassTransit.
Here for some of the things you will learn in this course:
- How to create ASP.NET Core 5 based microservices from scratch using Visual Studio Code
- Use individual MongoDB NoSQL databases for exclusive use by each microservice
- Implement asynchronous inter-service communication via RabbitMQ and MassTransit
- Microservices architecture fundamentals, pros and cons
- Implement common design patterns used with microservices like repository, retries with exponential backoff and circuit breaker
- Use C# 9 record types to define DTOs and message contracts used by the microservices
- How to implement the common operations of a microservices REST API
- Use Docker and Docker Compose to run services like MongoDB and RabbitMQ in your box to support your microservices
- Use Swagger/OpenAPI and Postman to explore and interact with your microservice APIs
- Implement resilient inter-service communication via IHttpClientFactory and Polly
- Implement eventual data consistency by replicating data across microservices
- Create NuGet packages to share reusable logic and message contracts across microservices
- Build two microservices of an end to end application where players can purchase game items with virtual currency
We will not jump straight to the ideal implementation, we will start with a very simple and “naïve” implementation, we will learn about common mistakes when implementing microservices, we will learn about multiple techniques and patterns in the microservices worldand finally we will arrive to a nice implementation based on best practices.
This is a beginner level course, so I intentionally take my time to explain every new concept in a very didactic way to ensure you understand the purpose of the code you are about to write. You will find no magic code copied from external or hidden sources. We will start absolutely from scratch and I will explain every line of code as I add them to the projects.
You should have some basic C# knowledge and ideally some web development experience to make the most of this course. However, I make no assumptions on your previous knowledge of ASP.NET Core or of any of the other libraries, tools and techniques used during the course. As long as you are eager to learn by doing, I think you will really enjoy this course since I will explain everything I do as we write the code together.
By the end of this course, you will have an application with two fully working .NET based microservices but most importantly you will understand every line of code, how the microservices work together and why we ended up with the final implementation.