Bedin | Practical Microservices with Dapr and .NET. | E-Book | www.sack.de
E-Book

E-Book, Englisch, 312 Seiten

Bedin Practical Microservices with Dapr and .NET.

A developer's guide to building cloud-native applications using the event-driven runtime
2. Auflage 2024
ISBN: 978-1-80324-065-7
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection

A developer's guide to building cloud-native applications using the event-driven runtime

E-Book, Englisch, 312 Seiten

ISBN: 978-1-80324-065-7
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection



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.

Bedin Practical Microservices with Dapr and .NET. jetzt bestellen!

Weitere Infos & Material


Table of Contents - Introducing Dapr
- 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


, , 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.

, , 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.

, , will discuss the relevance of microservices architectures and starts to explore how Dapr as a runtime can make it easier to adopt this style. 

, , 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.

, , will illustrate how a Dapr solution can manage states with different store types. Managing states for services and actors is a centerpiece of Dapr.

, , 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.

, , will detail how input bindings in Dapr enable you to design event-driven microservices and invoke external resources via a pluggable configuration.

, , 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.

, , 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.

, , 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.

, , 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.

, , 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.

, , 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 section in , .

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...


Bedin Davide :

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.



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.