Book Image

Microservices Design Patterns in .NET

By : Trevoir Williams
Book Image

Microservices Design Patterns in .NET

By: Trevoir Williams

Overview of this book

Are you a developer who needs to fully understand the different patterns and benefits that they bring to designing microservices? If yes, then this book is for you. Microservices Design Patterns in .NET will help you appreciate the various microservice design concerns and strategies that can be used to navigate them. Making a microservice-based app is no easy feat and there are many concerns that need to be addressed. As you progress through the chapters of this guide, you’ll dive headfirst into the problems that come packed with this architectural approach, and then explore the design patterns that address these problems. You’ll also learn how to be deliberate and intentional in your architectural design to overcome major considerations in building microservices. By the end of this book, you’ll be able to apply critical thinking and clean coding principles when creating a microservices application using .NET Core.
Table of Contents (21 chapters)
1
Part 1: Understanding Microservices and Design Patterns
8
Part 2: Database and Storage Design Patterns
11
Part 3: Resiliency, Security, and Infrastructure Patterns

What this book covers

Chapter 1, Introduction to Microservices the Big Picture, looks at microservice architecture at a high level and seeks to understand some of the early problems we might encounter and explores design patterns that address them.

Chapter 2, Working with the Aggregator Pattern, explores how domain-driven design and the aggregate pattern lay the foundation for scoping requirements and the foundation of microservice design.

Chapter 3, Synchronous Communication between Microservices, explores how we make microservices communicate synchronously and the potential drawbacks of this method.

Chapter 4, Asynchronous Communication between Microservices, looks at asynchronous communication between services, which allows us to send data and move along, regardless of the availability or potential long runtime of the other microservices being called.

Chapter 5, Working with the CQRS Pattern, explores the CQRS pattern and why it is useful in microservices development.

Chapter 6, Applying Event Sourcing Patterns, discusses the intricacies of event sourcing and how we can implement this to ensure that our data between services stays in sync.

Chapter 7, Handling Data for Each Microservice with Database per Service Pattern, covers the best practices surrounding implementing different databases in different services.

Chapter 8, Implement Transactions across Microservices Using the Saga Pattern, explores the Saga pattern and how it helps us implement transactions across our microservices.

Chapter 9, Building Resilient Microservices, reviews implementing retry and exit strategy logic for more resilient communication between services.

Chapter 10, Performing Health Checks on Your Services, reviews how we can implement health checks in our ASP.NET Core APIs and why they are essential.

Chapter 11, Implementing API and BFF Gateway Patterns, dives into implementing API gateways, the backed for frontend pattern, and how they help us to create a robust microservices application.

Chapter 12, Securing Microservices with Bearer Tokens, reviews how bearer tokens can secure communications with each service.

Chapter 13, Microservice Container Hosting, explores containerization and how we can leverage containers to efficiently host our microservices.

Chapter 14, Implementing Centralized Logging for Microservices, explores the steps and best practices for aggregating logs from several services into one viewing area.

Chapter 15, Wrapping It All Up, discusses the key points from each chapter and highlights how each plays a role in developing a microservices application.