Book Image

Building Microservices with .NET Core

By : Gaurav Aroraa, Lalit Kale, Manish Kanwar
Book Image

Building Microservices with .NET Core

By: Gaurav Aroraa, Lalit Kale, Manish Kanwar

Overview of this book

Microservices is an architectural style that 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 the business. We'll start by looking at what microservices are, and what the main characteristics are. Moving forward, you will be introduced to real-life application scenarios, and after assessing the current issues, we will begin the journey of transforming this application by splitting it into a suite of microservices. You will identify the service boundaries, split the application into multiple microservices, and define the 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 the reactive microservices, you strategically gain further value to keep your code base simple, focusing on what is more important rather than the messy asynchronous calls.
Table of Contents (10 chapters)

Advantages of microservices


Now let's try to quickly understand where microservices takes a leap ahead of the SOA and monolithic architectures:

  • Cost effective to scale: You don't need to invest a lot to make the entire application scalable. In terms of a Shopping cart, we could simply load balance the product search module and the order-processing module while leaving out less frequently used operation services, such as inventory management, order cancellation, and delivery confirmation.
  • Clear code boundaries: This action should match an organization's departmental hierarchies. With different departments sponsoring product development in large enterprises, this can be a huge advantage.
  • Easier code changes: The code is done in a way that it is not dependent on the code of other modules and is only achieving isolated functionality. If it were done right, then the chances of a change in a microservice affecting another microservice are very minimal.
  • Easy deployment: Since the entire application is more like a group of ecosystems that are isolated from each other, deployment could be done one microservice at a time, if required. Failure in any one of these would not bring the entire system down.
  • Technology adaptation: You could port a single microservice or a whole bunch of them overnight to a different technology without your users even knowing about it. And yes, hopefully, you don't expect us to tell you that you need to maintain those service contracts, though.
  • Distributed system: This comes implied, but a word of caution is necessary here. Make sure that your asynchronous calls are used well and synchronous ones are not really blocking the whole flow of information. Use data partitioning well. We will come to this little later, so don't worry for now.
  • Quick market response: The world being competitive is a definite advantage, as otherwise, users tend to quickly lose interest if you are slow to respond to new feature requests or adoption of a new technology within your system.