Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Practical Microservices with Dapr and .NET
Why subscribe?
Foreword
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Section 1: Introduction to Dapr
Chapter 1: Introducing Dapr
Technical requirements
An overview of Dapr
What Dapr is not
The architecture of Dapr
Setting up Dapr
Docker
The Dapr CLI
.NET Core
Visual Studio Code
Windows Terminal
Installing self-hosted Dapr
Installing Dapr in Kubernetes
Updating the Dapr version
Building our first Dapr example
Summary
Chapter 2: Debugging Dapr Solutions
Technical requirements
Configuring Dapr debug in VS Code
Attaching the debugger
Examining the debug configuration
Debugging a Dapr multi-project solution
Creating .NET solutions
Launching the configuration
Tasks
Launching debug sessions individually
Launching compound debug sessions
Using Tye with Dapr
Installing Tye
Using Tye
Summary
Section 2: Building Microservices with Dapr
Chapter 3: Service-to-Service Invocation
Technical requirements
How services work in Dapr
Introducing our sample architecture
Introducing service-to-service invocation
Name resolution
Service invocation with the .NET SDK
Creating a project for the Order service
Configuring Dapr in ASP.NET
Implementing Dapr with an ASP.NET controller
Creating a project for the Reservation service
Preparing the debugging configuration
Implementing Dapr with ASP.NET routing
Recap
HTTP and gRPC for Dapr services
gRPC in ASP.NET Core
The autonomy of a microservice
Winning latency with gRPC
Summary
Chapter 4: Introducing State Management
Technical requirements
Managing state in Dapr
State, stateless, and stateful
State stores in Dapr
Transactions
Concurrency
Consistency
Interaction with state stores
Stateful services in an e-commerce ordering system
Stateful reservation-service
Handling the Dapr state in ASP.NET controllers
Azure Cosmos DB as a state store
Setting up Azure Cosmos DB
Configuring the state store
Testing the state store
Partitioning with Cosmos DB
Wrapping up
Summary
Chapter 5: Publish and Subscribe
Technical requirements
Using the publish and subscribe pattern in Dapr
Using Azure Service Bus in Dapr
Subscribing a topic
Configuring a pub/sub component
Publishing to a topic
Inspecting the messages
Implementing a saga pattern
Publishing messages to Dapr
Subscribing to a Dapr topic
Testing the saga pattern
Summary
Chapter 6: Resource Bindings
Technical requirements
Learning how to use Dapr bindings
Configuring a Cron input binding
Testing the Cron binding
Using Twilio output bindings in Dapr
Signing up for a Twilio trial
Configuring a Twilio output binding
Signaling via the output binding
Verifying the notification
Ingesting data in C# with the Azure Event Hubs input binding
Creating an Azure Event Hubs binding
Configuring the input binding
Implementing an Azure Event Hubs input binding
Producing events
Summary
Chapter 7: Using Actors
Technical requirements
Using Actors in Dapr
Introduction to the actor pattern
Configuring the new state store
Verifying the configuration
Actor lifetime, concurrency, and consistency
Placement service
Concurrency and consistency
Lifetime
Implementing actors in an e-commerce reservation system
Preparing the Actor's projects
Implementing the actor's model
Accessing actors from the other Dapr applications
Inspecting the actor state
Summary
Section 3: Deploying and Scaling Dapr Solutions
Chapter 8: Deploying to Kubernetes
Technical requirements
Setting up Kubernetes
Creating an Azure Resource Group
Creating an AKS cluster
Connecting to the AKS cluster
Setting up Dapr on Kubernetes
Deploying a Dapr application to Kubernetes
Building Docker images
Pushing Docker images
Managing secrets in Kubernetes
Deploying applications
Exposing Dapr applications to external clients
Summary
Chapter 9: Tracing Dapr Applications
Technical requirements
Observing applications in Dapr
Tracing with Zipkin
Setting up Zipkin
Configuring the Dapr exporter
Enabling tracing in Dapr
Investigating with Zipkin
Analyzing metrics with Prometheus and Grafana
Installing Prometheus
Installing Grafana
Importing dashboards
Summary
Chapter 10: Load Testing and Scaling Dapr
Technical requirements
Bash
Python
Locust
Kubernetes configuration
Scaling Dapr on Kubernetes
Replicas
Autoscale
Resource requests and limits
Load testing with Locust
Load testing Dapr
Preparing the data via port-forward
Testing Locust locally
Locust on Azure Container Instances
Configuring the Horizontal Pod Autoscaler
Autoscaling with KEDA
Summary
Appendix: Microservices Architectures with Dapr
Discovering microservices
Service
Autonomy
Automated deployment
Bounded context
Loose coupling
Event-driven architecture
Observability
Sustainability
Adopting microservices patterns
Building an e-commerce architecture
Bounded contexts
An example – sales microservices
Building microservices with Dapr
Loosely coupled microservices
Autonomous microservices
Observable microservices
Scalable microservices
Event driven microservices
Stateless microservices
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
← Prev
Back
Next →
← Prev
Back
Next →