Book Image

Building Microservices with .NET Core 2.0 - Second Edition

By : Gaurav Aroraa
Book Image

Building Microservices with .NET Core 2.0 - Second Edition

By: Gaurav Aroraa

Overview of this book

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.
Table of Contents (11 chapters)

Overview of Azure Service Fabric

While we were talking about microservices in .NET Core world, Azure Service Fabric is the name that is widely used for microservices. In this section, we will discuss Fabric services.

This is a platform that helps us with easy packaging, deployment and managing scalable and reliable microservices (the container is also like Docker, and so on). Sometimes it is difficult to focus on your main responsibility as a developer, due to complex infrastructural problems, and such. With the help of Azure service fabric, developers need not worry about the infrastructural issues.

This bundles and has the power of Azure SQL Database, Cosmos DB, Microsoft Power BI, Azure Event Hubs, Azure IoT Hub, and many more core services.

As per official documentation (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-overview):

  • Service fabric—any OS, any cloud: You just need to create a cluster of service fabric and this cluster runs on Azure (cloud) or on premises, on Linux, or on a Windows server. Moreover, you can also create clusters on other public clouds.
  • Service fabric - stateless and stateful microservices: Yes, with the help of service fabric you can build applications as stateless and/or stateful.
"As per official documentation (https://docs.microsoft.com/en-us/azure/service-fabric/) of microservices:
Stateless microservices (such as protocol gateways and web proxies) do not maintain a mutable state outside a request and its response from the service. Azure Cloud Services worker roles are an example of a stateless service. Stateful microservices (such as user accounts, databases, devices, shopping carts, and queues) maintain a mutable, authoritative state beyond the request and its response."

There are different service fabric programming models available that are beyond the scope of this chapter. For more information, refer to: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-choose-framework.