Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microservices Design Patterns in .NET

You're reading from   Microservices Design Patterns in .NET Making sense of microservices design and architecture using .NET Core

Arrow left icon
Product type Paperback
Published in Jan 2023
Publisher Packt
ISBN-13 9781804610305
Length 300 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Trevoir Williams Trevoir Williams
Author Profile Icon Trevoir Williams
Trevoir Williams
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Part 1: Understanding Microservices and Design Patterns
2. Chapter 1: Introduction to Microservices – the Big Picture FREE CHAPTER 3. Chapter 2: Working with the Aggregator Pattern 4. Chapter 3: Synchronous Communication between Microservices 5. Chapter 4: Asynchronous Communication between Microservices 6. Chapter 5: Working with the CQRS Pattern 7. Chapter 6: Applying Event Sourcing Patterns 8. Part 2: Database and Storage Design Patterns
9. Chapter 7: Handling Data for Each Microservice with the Database per Service Pattern 10. Chapter 8: Implement Transactions across Microservices Using the Saga Pattern 11. Part 3: Resiliency, Security, and Infrastructure Patterns
12. Chapter 9: Building Resilient Microservices 13. Chapter 10: Performing Health Checks on Your Services 14. Chapter 11: Implementing the API and BFF Gateway Patterns 15. Chapter 12: Securing Microservices with Bearer Tokens 16. Chapter 13: Microservice Container Hosting 17. Chapter 14: Implementing Centralized Logging for Microservices 18. Chapter 15: Wrapping It All Up 19. Index 20. Other Books You May Enjoy

Determining the feasibility of implementing microservices

As we explore the microservices approach, we see where it does address certain things, while introducing a few more concerns. The microservices approach is certainly not a savior for your architectural challenges, and it introduces quite a few complexities. These concerns and complexities are generally addressed using design patterns, and using these patterns can save time and energy.

Throughout this book, we will explore the most common problems we face and look at the design pattern concepts that help us to address these concerns. These patterns can be categorized as follows.

Let us explore what each pattern entails:

  • Integration patterns: We have already discussed that microservices will need to communicate. Integration patterns serve to bring consistency to how we accomplish this. Integration patterns govern the technology and techniques that we use to accomplish cross-service communications.
  • Database and storage design patterns: We know that we are in for a challenge when it comes to managing data across our distributed services. Giving each service its own database seems easy until we need to ensure that data is kept consistent across the different data stores. There are certain patterns that are pivotal to us maintaining a level of confidence in what we see after each operation.
  • Resiliency, security, and infrastructure patterns: These patterns seek to bring calm and comfort to a brewing storm. With all the moving parts that we have identified, it is important to ensure that as many things as possible are automated and consistent in the deployment. Additionally, we want to ensure that security is adequately balanced between the system needs and a good user experience. These patterns help us to ensure that our systems are always performing at peak efficiency.

Next, let us discuss using .NET Core as our development stack for microservices.

Microservices and .NET Core

This book addresses implementing microservices and design patterns using .NET Core. We have mentioned that this architectural style is platform agnostic and has been implemented using several frameworks. Comparably, however, ASP.NET Core makes microservices development very easy and offers many benefits, including cloud integrations, rapid development, and cross-platform support:

  • Excellent tooling: The SDK required for .NET development can be installed on any operating system. This is further complemented by their lightweight and open source development tool, Visual Studio Code. You can easily create an API project by running dotnet new webapi on your computer. If you prefer the fully powered Visual Studio IDE, then you might be limited to Windows and macOS. You will have all the tools you need to be successful regardless of the operating system.
  • Stability: At the time of writing this book, the latest stable version is .NET 7, with standard term support. The .NET development team is always pushing the envelope and ensuring that reverse compatibility is maintained with each major version release. This makes updating to the next version much less difficult, and you need not worry about too many breaking changes all at once.
  • Containerization and scaling: ASP.NET Core applications can easily be mounted on a Docker container, and while this is not necessarily new, we can all appreciate a guaranteed render speed and quality. We can also leverage Kubernetes and easily scale our microservices using all the features of K8s.

.NET development has come a long way, and these are exciting times to push the boundaries of what we can build, using their tools and services.

You have been reading a chapter from
Microservices Design Patterns in .NET
Published in: Jan 2023
Publisher: Packt
ISBN-13: 9781804610305
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image