Hands-On Microservices with C#
Designing a real-worl, enterprise-grade microservice ecosystem with the efficiency of C# 7
Matt R. Cole
- 254 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Hands-On Microservices with C#
Designing a real-worl, enterprise-grade microservice ecosystem with the efficiency of C# 7
Matt R. Cole
About This Book
Build enterprise-grade microservice ecosystems with intensive case studies using C#
Key Features
- Learn to build message-based microservices
- Packed with case studies to explain the intricacies of large-scale microservices
- Build scalable, modular, and robust architectures with C#
Book Description
C# is a powerful language when it comes to building applications and software architecture using rich libraries and tools such as.NET.
This book will harness the strength of C# in developing microservices architectures and applications.
This book shows developers how to develop an enterprise-grade, event-driven, asynchronous, message-based microservice framework using C#, .NET, and various open source tools. We will discuss how to send and receive messages, how to design many types of microservice that are truly usable in a corporate environment. We will also dissect each case and explain the code, best practices, pros and cons, and more.
Through our journey, we will use many open source tools, and create file monitors, a machine learning microservice, a quantitative financial microservice that can handle bonds and credit default swaps, a deployment microservice to show you how to better manage your deployments, and memory, health status, and other microservices. By the end of this book, you will have a complete microservice ecosystem you can place into production or customize in no time.
What you will learn
- Explore different open source tools within the context of designing microservices
- Learn to provide insulation to exception-prone function calls
- Build common messages used between microservices for communication
- Learn to create a microservice using our base class and interface
- Design a quantitative financial machine microservice
- Learn to design a microservice that is capable of using Blockchain technology
Who this book is for
C# developers, software architects, and professionals who want to master the art of designing the microservice architecture that is scalable based on environment. Developers should have a basic understanding of.NET application development using C# and Visual Studio
Frequently asked questions
Information
Let's Talk Microservices, Messages, and Tools
- What a microservice is
- What a microservice architecture is
- Pros and cons of a microservice
- Installing and an overview of Topshelf
- Installing and an overview of RabbitMQ
- Installing and an overview of EasyNetQ
- Installing and an overview of Autofac
- Installing and an overview of Quartz
- Installing and an overview of Noda Time
What is a microservice?
Service-Oriented Architecture
- It represents a specific business function or purpose (hopefully)
- It is self-contained
- It can and should function as a black box
- It may also be comprised of other associated services
- There is a hard and dedicated contract for each service (usually)
Microservice architecture
- Each microservice can be deployed, developed, maintained, and then redeployed independently.
- Each microservice focuses on a specific business purpose and goal and is non-monolithic.
- Each microservice receives requests, processes them, and then may or may not send a response.
- Microservices practice decentralized governance and in some cases, when permissible, decentralized data management.
- Perhaps most importantly, at least in my mind anyways, I always design a microservice around failure. In fact, they are designed to fail. By following this paradigm, you will always be able to handle failures gracefully and not allow one failing microservice to negatively impact the entire ecosystem. By negatively impact, I mean a state where all other microservices are throwing exceptions due to the one errant microservice. Every microservice needs to be able to gracefully handle not being able to complete its task.
- Finally, let's stay flexible and state that our microservice architecture is free to remain fluid and evolutionary.
- No microservice talks directly to another microservice. Communication is always done in the form of messages.
Pros and cons
Pros
- They give developers the freedom to independently architect, develop, and deploy services
- Microservices can be developed in different languages if permitted
- Easier integration and deployment than traditional monolithic applications and services
- Microservices are organized around specific business capabilities
- When change is required, only the specific microservice needs to be changed and redeployed
- Enhanced fault isolation
- They are easier to scale
- Integration to external services is made easier
Cons
- Testing can be more involved
- Duplication of effort and code can occur more often
- Product management could become more complicated
- Developers may have more work when it comes to communications infrastructure
- Memory consumption may increase