Book Image

Practical Microservices with Dapr and .NET - Second Edition

By : Davide Bedin
Book Image

Practical Microservices with Dapr and .NET - Second Edition

By: Davide Bedin

Overview of this book

This second edition will help you get to grips with microservice architectures and how to manage application complexities with Dapr in no time. You'll understand how Dapr simplifies development while allowing you to work with multiple languages and platforms. Following a C# sample, you'll understand how Dapr's runtime, building blocks, and software development kits (SDKs) help you to simplify the creation of resilient and portable microservices. Dapr provides an event-driven runtime that supports the essential features you need for building microservices, including service invocation, state management, and publish/subscribe messaging. You'll explore all of those in addition to various other advanced features with this practical guide to learning Dapr. With a focus on deploying the Dapr sample application to an Azure Kubernetes Service cluster and to the Azure Container Apps serverless platform, you’ll see how to expose the Dapr application with NGINX, YARP, and Azure API Management. By the end of this book, you'll be able to write microservices easily by implementing industry best practices to solve problems related to distributed systems.
Table of Contents (20 chapters)
1
Part 1: Introduction to Dapr
5
Part 2: Building Microservices with Dapr
11
Part 3: Deploying and Scaling Dapr Solutions

Preface

Practical microservices with Distributed Application Runtime (Dapr) and .NET helps you discover the powerful capabilities of Dapr by implementing a sample application with microservice architecture, using one of Dapr’s many building blocks in each chapter of this book.

Over the last decade, there has been a huge shift from heavily coded monolithic applications to finer, self-contained microservices. Dapr helps developers build cloud-native applications by providing the building blocks as an easy-to-use API. It offers platform-agnostic features for running your applications on the public cloud, on-premises, and even on edge devices.

This book aims to familiarize you with microservice architecture while managing application complexities and getting into the nitty-gritty of Dapr in no time. You will also see how it combines the simplicity of its implementation with its openness to multiple languages and platforms. We will explore how Dapr’s runtime, services, building blocks, and SDKs will help you simplify the creation of resilient and portable microservices.

Dapr provides an event-driven runtime that supports the essential features you need to build microservices, such as service invocation, state management, and publish and subscribe messaging. You’ll explore all of these in addition to various other advanced features with this practical guide to learning about Dapr.

This book guides you in creating a sample application based on Dapr, which you’ll then deploy to Kubernetes, and the multiple ways of exposing your application to clients that you can leverage, including integrating API Management with Dapr. In this operating environment, you’ll learn how to monitor Dapr applications using Zipkin, Prometheus, and Grafana. After learning how to perform load-testing on Dapr applications in Kubernetes, we will explore how to leverage Dapr with a serverless container service.

By the end of this book, you’ll be able to write microservices easily using your choice of language or framework by implementing the industry best practices to solve any problems related to distributed systems.