Williams, Trevoir | Microservices Design Patterns in .NET | E-Book | www.sack.de
E-Book

E-Book, Englisch, 300 Seiten

Williams, Trevoir Microservices Design Patterns in .NET

Making sense of microservices design and architecture using .NET Core
1. Auflage 2024
ISBN: 978-1-80461-311-5
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection

Making sense of microservices design and architecture using .NET Core

E-Book, Englisch, 300 Seiten

ISBN: 978-1-80461-311-5
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection



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.

Williams, Trevoir Microservices Design Patterns in .NET jetzt bestellen!

Weitere Infos & Material


Table of Contents - Introduction To Microservices: The Big Picture
- Working with the Aggregator Pattern
- Implementing the Chain of Responsibility Pattern (Synchronous Communication)
- Asynchronous Communication between microservices
- Working with the CQRS Pattern
- Applying Event Sourcing Patterns
- Handling Data for Each Microservice with Database Per Service Pattern
- Implement transactions across microservices using the Saga pattern
- Build a fault-tolerant and resilient system with the Circuit Breaker Pattern
- Performing Health Checks of your services
- Reviewing the implementation of API Gateway Pattern
- API Security with Bearer Tokens
- Microservice Container Hosting
- Implementing Centralized Logging for Microservices
- Wrapping it all up


Preface


Hello there! We are here to explore design and development patterns that we can leverage when building a microservice application with .NET. Microservice architecture involves separating a potentially complex application into smaller, more maintainable services that must work together. Essentially, we take one big application and break it down into smaller parts.

This approach introduces a fresh crop of complexities in the application’s design since these now separate services need to collaborate to deliver a unified experience to the end user. As such, we need to understand the various drawbacks of this architectural approach and strategize on how we can address the various concerns.

We will focus on using .NET, given that Microsoft has a proven track record of releasing and supporting top-notch tooling and support for the most recent technologies that allow us to develop cutting-edge solutions. Some of the reasons we focus on development with .NET are as follows:

  • Well maintained: Microsoft is constantly pushing the boundaries and introducing new ways to accomplish old things and new ways to implement solutions and increase productivity. It is a well-maintained, supported, and documented ecosystem.
  • Performance: .NET increases its performance with each new release. Microservices must be as performant and responsive as possible to ensure that the end user’s experience is as clean as possible.
  • Cross-platform: .NET Core is cross-platform and can be deployed on virtually any technology stack. This reduces the limitations surrounding deploying and supporting services written using .NET technology.
  • Support for various technologies: Each problem has a technology that helps us to implement a solution. .NET has support for many technologies, making it a great candidate for universal development needs.

We want to ensure that we understand the possibilities and strategies needed while developing an application based on microservices architecture. We will review the theory behind each problem and then explore the potential solutions and technologies that help us to implement the best possible solution to our challenges while developing a solution.

Who this book is for


This book is designed for .NET developers who wish to demystify the various moving parts of microservices architecture. To get the most out of the book, you should ideally fit into one of these categories:

  • Team leads: Leaders who need to understand the various moving parts and the theory behind design decisions that need to be made
  • Senior developers: Developers who need to appreciate how to guide the development efforts and implement complex blocks of code
  • Intermediate .NET developers: .NET developers who have a working knowledge of the .NET ecosystem and want to dig deeper into developing more complex solutions

The overall content of this book will assist you in understanding the dynamics of microservices application design and assist you in reaching the next level of development.

What this book covers


, 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.

, explores how domain-driven design and the aggregate pattern lay the foundation for scoping requirements and the foundation of microservice design.

, , explores how we make microservices communicate synchronously and the potential drawbacks of this method.

, , 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.

, , explores the CQRS pattern and why it is useful in microservices development.

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

, , covers the best practices surrounding implementing different databases in different services.

, , explores the Saga pattern and how it helps us implement transactions across our microservices.

, , reviews implementing retry and exit strategy logic for more resilient communication between services.

, , reviews how we can implement health checks in our ASP.NET Core APIs and why they are essential.

, , dives into implementing API gateways, the backed for frontend pattern, and how they help us to create a robust microservices application.

, , reviews how bearer tokens can secure communications with each service.

, , explores containerization and how we can leverage containers to efficiently host our microservices.

, , explores the steps and best practices for aggregating logs from several services into one viewing area.

, , discusses the key points from each chapter and highlights how each plays a role in developing a microservices application.

To get the most out of this book


You will need knowledge of API development using ASP.NET Core and basic database development knowledge. This book is best suited for intermediate-level developers looking to improve their understanding of development design patterns.

Software/hardware covered in the book

Operating system requirements

ASP.NET Core 6/7

Windows, macOS, or Linux

C# 9/10

Windows, macOS, or Linux

Docker

Windows, macOS, or Linux

Most examples are shown using NuGet package manager commands and Visual Studio 2022. These commands can be translated into dotnet CLI commands, which can be used on any operating system and with alternative IDEs to Visual Studio.

Download the example code files


You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Microservices-Design-Patterns-in-.NET. If there’s an update to the code, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images


We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/dD3Jv.

Conventions used


There are several text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, commands, and keywords. Here is an example: “As it stands, our CreateAppointmentHandler will handle everything that is needed in the situation.”

A block of code is set as follows:

public class AppointmentCreated : IDomainEvent     {         public Appointment { get; set; }         public DateTime ActionDate { get; private set; }

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Select System info from the Administration panel.”

Tips or important notes

Appear like this.

Get in touch


Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at customercare@packtpub.com and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful...


Williams Trevoir :

Trevoir Williams is a software engineer and part-time lecturer. With a master's degree in computer science, he has spent over a decade teaching web, software, and database development courses. He also has extensive industry experience in web application development, Azure Cloud system, and server administration. He enjoys teaching IT and development courses and hopes to impart knowledge of the latest developments in industry standards and techniques to his students.



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.