Book Image

Microservices with Azure

By : Rahul Rai, Namit Tanasseri
Book Image

Microservices with Azure

By: Rahul Rai, Namit Tanasseri

Overview of this book

Microsoft Azure is rapidly evolving and is widely used as a platform on which you can build Microservices that can be deployed on-premise and on-cloud heterogeneous environments through Microsoft Azure Service Fabric. This book will help you understand the concepts of Microservice application architecture and build highly maintainable and scalable enterprise-grade applications using the various services in Microsoft Azure Service Fabric. We will begin by understanding the intricacies of the Microservices architecture and its advantages over the monolithic architecture and Service Oriented Architecture (SOA) principles. We will present various scenarios where Microservices should be used and walk you through the architectures of Microservice-based applications. Next, you will take an in-depth look at Microsoft Azure Service Fabric, which is the best–in-class platform for building Microservices. You will explore how to develop and deploy sample applications on Microsoft Azure Service Fabric to gain a thorough understanding of it. Building Microservice-based application is complicated. Therefore, we will take you through several design patterns that solve the various challenges associated with realizing the Microservices architecture in enterprise applications. Each pattern will be clearly illustrated with examples that you can keep referring to when designing applications. Finally, you will be introduced to advanced topics such as Serverless computing and DevOps using Service Fabric, to help you undertake your next venture with confidence.
Table of Contents (23 chapters)
Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
Part 1 – Laying The Foundation
Part 2 – Microsoft Azure Service Fabric
Part 3 – Microservice Architecture Patterns
Part 4 – Supplementary Learning

Sagas


Problem

In a distributed system, messages sent by the services might not be controlled. As the system grows and more services are added, the system starts becoming unmaintainable. In a large distributed system, it becomes hard to track which message goes where.

Sagas (Problem)

Another problem that Microservices-based system encounters is that there is no single source of truth that can be used by all the services. For instance, in an e-commerce application, when a customer places an order a message containing order details is sent to the procurement service. Once the order service responds, another message containing delivery details is sent to the delivery service. This leads to there being no single source of truth that contains the entire customer order data.

Solution

Using sagas, workflows can be implemented in a Microservice application. Sagas are state machines that model a workflow with steps to be executed. Sagas treat the various Microservices as implementations of workflow.

In...