
Practical Microservices with Dapr and .NET.
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
All prices
More details
Other editions
Previous edition

Persons
Davide Bedin is a cloud-native architecture enthusiast, with strong and relevant experience with cloud platforms. As CTO of an ISV, Davide led its significant transformational process with the objective of creating new solutions based on the Microsoft Azure cloud. Davide particularly focused on the evolution of distributed computing to service-oriented architectures, and ultimately microservices, spending most of his developer career creating web services. As a Cloud Solution Architect at Microsoft, Davide is responsible for the guidance and support of enterprise customers in embracing the cloud paradigm, a key enabler of their digital transformation; lately, he also plays with Dapr.
Content
- Debugging Dapr Solutions
- Microservices Architecture with Dapr
- Service-to-Service invocation
- Introducing State Management
- Publish and Subscribe
- Resource bindings
- Using Actors
- Deployment to Kubernetes
- Exposing Dapr Applications
- Tracing Dapr Application
- Load testing and Scaling Dapr
- Leveraging serverless containers with Dapr
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.
Who this book is for
This book is for developers looking to explore microservices architectures and implement them in Dapr applications using .NET examples. Whether you are new to microservices or have knowledge of this architectural approach and want to get hands-on experience of using Dapr, you'll find this book useful. Familiarity with .NET will help you to understand the C# samples and code snippets used in the book.
What this book covers
Chapter 1, Introducing Dapr, will introduce you to the basics of Dapr, briefly exposing the features that make Dapr interesting for new cloud-native applications, as well as for inserting microservices into existing applications.
Chapter 2, Debugging Dapr Solutions, will focus on how to set up your Dapr development environment in VS Code to locally debug simple Dapr solutions, as well as more complex ones.
Chapter 3, Microservices Architecture with Dapr, will discuss the relevance of microservices architectures and starts to explore how Dapr as a runtime can make it easier to adopt this style.
Chapter 4, Service-to-Service Invocation, will instruct you on how services can discover and invoke each other via the Dapr infrastructure. With examples, you will understand how to implement services and invoke them from other Dapr-aware components and Dapr-unaware or external clients.
Chapter 5, Introducing State Management, will illustrate how a Dapr solution can manage states with different store types. Managing states for services and actors is a centerpiece of Dapr.
Chapter 6, Publish and Subscribe, will teach you about publish and subscribe, which is the messaging pattern used by Dapr to enable decoupled interactions between components. Input bindings enable you to trigger your microservice using an incoming Twilio SMS or an Azure Service Bus message.
Chapter 7, Resource Bindings, will detail how input bindings in Dapr enable you to design event-driven microservices and invoke external resources via a pluggable configuration.
Chapter 8, Using Actors, will help you learn about the powerful virtual actor model provided by Dapr, how to leverage it in a microservices-style architecture, and the pros and cons of different approaches.
Chapter 9, Deployment to Kubernetes, will help distinguish the basic differences between local Standalone mode and Kubernetes mode in terms of their operations. Specifically using Azure Kubernetes Service, we will deploy a Dapr sample application composed of several microservices to Kubernetes.
Chapter 10, Exposing Dapr Applications, will explore how we can expose our Dapr applications to our end users. Specifically using Azure Kubernetes Service, we will expose our Dapr sample application on Kubernetes via NGINX and Azure API Management.
Chapter 11, Tracing Dapr Applications, will outline the observability options in Dapr by exploring how traces, logs, and metrics are emitted and can be collected in Dapr using Zipkin, Prometheus, and Grafana.
Chapter 12, Load-Testing and Scaling Dapr, will elaborate on how the scaling of Dapr services and actors works in Kubernetes, and by leveraging Locust, the reader will also learn how to load-test a Dapr solution by simulating user behaviors via the Locust testing tool.
Chapter 13, Leveraging Serverless Containers with Dapr, will guide you on how to benefit from Kubernetes without its complexities by adopting serverless containers with Azure. We will understand how to deploy a Dapr application to Azure Container Apps.
To get the most out of this book
While the samples in the book have been written on Windows 10, the technology stack used is multiplatform: VS Code, .NET 6, Dapr, Kubernetes, and Locust all offer tools and libraries for multiple platforms.
On Windows 10, it is recommended to have WSL 2 installed and enable the WSL 2 engine in Docker.
For detailed instructions on how to set up your environment, please see the Setting up Dapr section in Chapter 1, Introducing Dapr.
The samples and scripts in this book have been tested with Dapr version 1.8 and .NET 6.
Software/hardware covered in the book
Operating system requirements
Docker Engine - latest version
Windows, any version supporting .NET 6
.NET 6
Windows, any version supporting .NET 6
Dapr 1.8 or later
Windows, any version supporting .NET 6
VS Code - latest version
Windows, any version supporting .NET 6
Azure CLI - latest version
Windows, any version supporting .NET 6
Python 3.8 or later
Windows, any version supporting .NET 6
Locust 2.10 or later
Windows, any version supporting .NET 6
Access to an Azure subscription is required, as the samples leverage many Azure services. Each chapter will give you instructions and direct you to the documentation for further information.
If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book's GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.
After reading this book, continue your learning by looking through the Dapr documentation at https://docs.dapr.io/ and follow the community meetings at https://github.com/dapr/community#community-meetings; these are a great opportunity to learn, ask questions, and share your experience with Dapr.
Download the example code files
You can download the example code files for...
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.
File format: ePUB
Copy protection: without DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Use a reader that can handle the file format ePUB, such as Adobe Digital Editions or FBReader – both free (see eBook Help).
- Tablet/Smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePUB works well for novels and non-fiction books – i.e., 'flowing' text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook does not use copy protection or Digital Rights Management
For more information, see our eBook Help page.