Book Image

Hands-On Microservices with C# 8 and .NET Core 3 - Third Edition

By : Gaurav Aroraa, Ed Price
Book Image

Hands-On Microservices with C# 8 and .NET Core 3 - Third Edition

By: Gaurav Aroraa, Ed Price

Overview of this book

<p>The microservice architectural style promotes the development of complex applications as a suite of small services based on specific business capabilities. With this book, you'll take a hands-on approach to build microservices and deploy them using ASP .NET Core and Microsoft Azure. </p><p>You'll start by understanding the concept of microservices and their fundamental characteristics. This microservices book will then introduce a real-world app built as a monolith, currently struggling under increased demand and complexity, and guide you in its transition to microservices using the latest features of C# 8 and .NET Core 3. You'll identify service boundaries, split the application into multiple microservices, and define service contracts. You'll also explore how to configure, deploy, and monitor microservices using Docker and Kubernetes, and implement autoscaling in a microservices architecture for enhanced productivity. Once you've got to grips with reactive microservices, you'll discover how keeping your code base simple enables you to focus on what's important rather than on messy asynchronous calls. Finally, you'll delve into various design patterns and best practices for creating enterprise-ready microservice applications. </p><p>By the end of this book, you'll be able to deconstruct a monolith successfully to create well-defined microservices.</p>
Table of Contents (16 chapters)

What this book covers

Chapter 1, An Introduction to Microservices, discusses the basics of microservices, reviews a monolith application, and uncovers its limitations. You will also learn how to start the transition to a microservices architecture.

Chapter 2, Refactoring the Monolith, discusses the current stack of the application. It also covers the features of .NET Core and C#8, demonstrates how to implement separate microservices, and looks at communication between microservices.

Chapter 3, Effective Communication between Services, covers communication between services, including synchronous and asynchronous communication, and an overview of Azure Service Bus. Additionally, the chapter examines integration with the help of an integration pattern. An overview of Azure Service Fabric is followed by a look at Docker and containers, as well as an overview of Azure Kubernetes Service, IoT Hub, and IoT Edge.

Chapter 4, Testing Microservices with the Microsoft Unit Testing Framework, covers various types of services and their differences. Here you will implement testing approaches using the Microsoft Unit Testing Framework, Moq, and the ASP.NET Core API.

Chapter 5Deploying Microservices with Docker, covers the deployment paradigm and explains deployment terminology.

Chapter 6, Securing Microservices Using Azure Active Directory, uncovers the concept of securing microservices by deploying a sample application using Azure Active Directory.

Chapter 7, Monitoring Microservices, covers instrumentation and telemetry, followed by monitoring strategies, logging, and monitoring in the cloud.

Chapter 8, Scaling Microservices with Azure, explores scalability, infrastructure scaling, and microservices scaling. The chapter also presents an overview of Azure Redis Cache.

Chapter 9, Introduction to Reactive Microservices, introduces you to reactive microservices with the help of code examples.

Chapter 10, Design Patterns and Best Practices, covers high-level patterns to help build microservices, as well as Aggregator, DDD, API gateways, the Shared Data microservices pattern, the anti-corruption layer pattern, and BFF.

Chapter 11, Building a Microservice Application, examines the various approaches that are available to develop a real-world application.

 Chapter 12, Microservices Architecture Summary, looks at how applications could evolve in the future by following the microservices approach.

Appendix, explains about the API Gateway pattern and the Backends to Frontends pattern, in terms of their pros and cons, to help us understand their best practices.