In Building Microservices with .NET Core 2.0, Gaurav Aroraa breaks through the hype of microservices by both defining microservices as well as providing practical examples of how to use this new software architecture. While contrasting with monolithic software architecture, the benefits of microservices are explained and put into practice in the building of an application in .Net Core. The book uses the scenario where a fictitious company overcomes the challenges around migrating a monolithic solution to microservices.
This book is for developers with some experience developing large scale applications. The book does describe the issues involved with developing larger solutions in an organization but really someone will need to have experienced the challenges of working in teams to appreciate the need for microservices, and really, the need for software architecture. The code, .Net Core C#, is explained in enough detail to where most developers should be able to follow along without any issues. The focus is more on microservices than teaching .Net Core.
What is covered
The book covers many aspects of microservices including:
The book covers approaches to communicating between services and patterns applicable to microservies. The API gateway, even-driven pattern and event sourcing is covered as well as compensating transactions. The concepts of eventual consistent as well as competing consumers is also explained. The technologies of Azure Service Bus and Azure Storage Queues are covered including an example implementation using an Azure Service Bus queue.
Handling the challenges around microservices is explained including testing strategies and types of testing. How stubs and mocks relate to microservices is covered as well as unit tests, integration tests and consumer-driven contract tests.
The need for a new deployment paradigm is explained by contrasting the monolithic deployment versus the microservices deployment requirements. Containers are explained as well as a practical example of using Docker for .Net Core.
The security requirements for microservices is explained as well as different types of relevant security including JSON Web Tokens, OAuth, OpenID Connect and Azure Active Directory. An example of microservice authentication is provided using OpenID Connect and Azure Active Directory. Azure API management and container security is also covered.
Instrumentation as well as telemetry are explained in how they relate to microservices. The different aspects, from health and availability to auditing and SLA, are explored. Challenges and strategies to overcome them are described as well. All have a focus towards Azure as a well as ELK and Splunk monitoring solutions.
Different aspects of scaling microservices is also explained including characteristics of scalable microservices and service design. Caching, redundancy and fault tolerance are also explained.
An explanation of reactive microservices and its characteristics is explored. Security, scalability and communication resilience is explained. An example of a .Net Core reactive microservice is provided.
Official Book Excerpt
The microservices architectural style promotes the development of complex applications as a suite of small services based on business capabilities. This book will help you identify the appropriate service boundaries within your business. We'll start by looking at what microservices are and their main characteristics.
Moving forward, you will be introduced to real-life application scenarios; after assessing the current issues, we will begin the journey of transforming this application by splitting it into a suite of microservices using C# 7.0 with .NET Core 2.0. You will identify service boundaries, split the application into multiple microservices, and define service contracts. You will find out how to configure, deploy, and monitor microservices, and configure scaling to allow the application to quickly adapt to increased demand in the future.
With an introduction to reactive microservices, you’ll strategically gain further value to keep your code base simple, focusing on what is more important rather than on messy asynchronous calls.
Gaurav Aroraa is a Microsoft Most Valuable Professional [MVP] and has a degree of MPhil in computer science. His 19 years of experience in software development and application support using Microsoft Technologies spans across domains, such as aeronautics, finance, insurance, healthcare, construction, and media. He is a Scrum Certified Trainer/Coach, Microsoft Certified Technology Specialist, XEN certified for ITIL-F, and APMG certified for PRINCE-F and PRINCE-P. Gaurav likes to learn new processes and technologies and sharing his experiences with people.
He is a founder of InnatusCuro Software LLC, and his present responsibilities include application architecture, defining strategy for continuous integration, and deployment. Gaurav also plays a vital community role through the IndiaMentor platform. He is also managing DotNetSpider as a Webmaster.