liveBook · Manning

What you will learn in Building Distributed Applications that Work

Design, debug, test, observe, secure, and deploy

by Fiodar Sazanavets

Chapter by chapter

Chapter 1: Getting started with distributed systems and Aspire

The introduction explains why a multi-component application is difficult to run locally and how Aspire’s AppHost gives developers one place to model and work with it.

1.1 The online shop as a distributed workflow · 1.2 Why the application is difficult to develop locally · 1.2.1 Starting several resources · 1.2.2 Managing addresses and configuration · 1.2.3 Dealing with network boundaries · 1.2.4 Finding failures across multiple components · 1.2.5 Testing the complete workflow · 1.2.6 The need for development-time orchestration · 1.3 Overview of orchestration · 1.4 How Aspire changes the game · 1.5 Getting started with the Aspire Starter Project · 1.6 Orchestrating with Aspire · 1.7 Setting up Aspire’s orchestrator · 1.7.1 Installing Aspire dependencies · 1.7.2 Host application startup and service registration · 1.7.3 Registering the UI application · 1.8 Introducing service defaults · 1.8.1 Adding extension methods · 1.8.2 Using the extension methods · 1.9 Service discovery in Aspire · 1.9.1 Registering service-discovery components · 1.9.2 Enabling service discovery · 1.9.3 Using service discovery · 1.10 Summary

What you learn in chapter 1 →

Chapter 2: Managing infrastructure components with containers and integrations

Introduces two ways to connect infrastructure components to Aspire applications and explains why service discovery matters when those components and services connect.

2.1 Docker containers · 2.2 Keycloak overview · 2.3 Initial setup · 2.4 Adding a Keycloak container to an Aspire host · 2.4.1 Configuring the web frontend app · 2.4.2 Configuring API service · 2.4.3 Other service types Aspire can host · 2.5 How Aspire integration libraries differ from containers · 2.6 Configuring Aspire integrations on the host · 2.6.1 Connecting to an integration from a hosted service · 2.6.2 Viewing integrations in the dashboard · 2.7 Building an Aspire integration library · 2.7.1 Building an integration component · 2.7.2 Launching a custom integration from the Aspire host · 2.8 Summary

What you learn in chapter 2 →

Chapter 3: Using database and storage components

The introduction explains why the e-commerce app needs databases and establishes that Aspire integration libraries support both relational and NoSQL databases.

3.1 Connecting Aspire to an existing database · 3.2 SQL database components basics · 3.2.1 Working with the SQL data model · 3.2.2 Displaying the DTO information in the UI · 3.3 Hosting a SQL Server component · 3.3.1 Consuming a SQL Server integration · 3.3.2 Using Entity Framework · 3.3.3 Integrating with Azure SQL Server · 3.4 Hosting an Oracle component · 3.5 Hosting a PostgreSQL component · 3.6 Introduction to NoSQL · 3.6.1 Introduction to MongoDB · 3.6.2 Hosting a MongoDB component · 3.6.3 Working with a MongoDB client · 3.6.4 Other NoSQL components · 3.6.5 Hosting a Cosmos DB component · 3.6.6 Connecting to Cosmos DB · 3.7 Azure Storage integration · 3.7.1 Hosting Azure Storage components · 3.7.2 Interacting with Azure Table Storage · 3.7.3 Integrating with Azure Blob Storage · 3.8 Summary

What you learn in chapter 3 →

Chapter 4: Adding order-tracking functionality with SignalR

The chapter introduces a delivery-tracking app whose map updates automatically as a driver moves, and identifies the two capabilities needed to build it.

4.1 What is SignalR? · 4.2 Introduction to OpenLayers · 4.3 Building a delivery-tracking system · 4.3.1 Setting up a SignalR hub · 4.3.2 Registering a SignalR hub · 4.3.3 Simulating location updates · 4.4 Building the frontend map UI · 4.4.1 Registering frontend dependencies · 4.4.2 Building the interactive UI · 4.5 Summary

What you learn in chapter 4 →

Chapter 5: Building a ChatGPT clone with Aspire, Ollama, and Semantic Kernel

The introduction motivates a product-specific chat assistant and identifies Semantic Kernel and Ollama as tools for adding a self-hosted LLM to an Aspire application.

5.1 Hosting an LLM anywhere with Ollama · 5.2 Adding Semantic Kernel · 5.2.1 Building the chatbot backend · 5.2.2 Adding Semantic Kernel backend logic · 5.3 Finalizing the user interface · 5.3.1 Adding a SignalR JavaScript client · 5.3.2 Building the chat page · 5.3.3 Adding the SignalR client to the page · 5.4 Summary

What you learn in chapter 5 →

Chapter 6: Integration testing and monitoring

The chapter introduction explains why monitoring a running application matters and places it alongside predeployment testing as a way to improve resilience.

6.1 Components of monitoring systems · 6.1.1 Logging · 6.1.2 Metrics · 6.1.3 Traces · 6.2 Monitoring Aspire applications · 6.3 Configuring the telemetry · 6.4 Viewing information in the dashboard · 6.5 Health checks in Aspire · 6.5.1 Service statuses in Aspire’s dashboard · 6.5.2 How health checks are configured inside Aspire apps · 6.5.3 Mapping health-check endpoints · 6.5.4 Monitoring app health in production · 6.6 Setting up integration tests in Aspire · 6.6.1 Adding a test project · 6.6.2 Installing required dependencies for testing · 6.6.3 Adding Aspire integration tests · 6.6.4 Using different testing frameworks · 6.6.5 Expanding test functionality · 6.6.6 What about component testing? · 6.7 Summary

What you learn in chapter 6 →

Chapter 7: Components for messaging and caching

Introduces how message brokers connect distributed services, how queued messages are processed, and how queue-based and topic-based delivery differ.

7.1 Working with RabbitMQ · 7.1.1 Hosting a RabbitMQ component · 7.1.2 Adding order-processing functionality · 7.1.3 Sending messages via RabbitMQ · 7.1.4 Consuming RabbitMQ messages · 7.2 Working with Azure Queue Storage · 7.2.1 Hosting an emulated Azure Queue Storage component · 7.2.2 Sending messages via Azure Queue Storage · 7.2.3 Consuming Azure Queue Storage messages · 7.3 Overview of distributed cache and lock · 7.4 Setting up Redis for caching and locking · 7.4.1 Installing a Redis component · 7.4.2 Installing the Redis client for distributed caching · 7.4.3 Using a distributed cache · 7.4.4 Using a distributed lock · 7.5 Managing the Redis cache · 7.6 Summary

What you learn in chapter 7 →

Chapter 8: Application security in Aspire

The chapter introduction explains why publicly accessible Aspire applications need security, why the approach is not tied to one identity provider, and why the dashboard needs separate protection.

8.1 A brief introduction to single sign-on · 8.2 Using service discovery in SSO · 8.3 Enforcing UI authentication · 8.3.1 Partially enforcing security · 8.4 Enforcing API authentication · 8.4.1 Passing a JWT to the API · 8.5 Securing the Aspire dashboard · 8.6 Summary

What you learn in chapter 8 →

Chapter 9: Deploying Aspire apps to production

Introduces the move from local Aspire orchestration to production deployment and previews the chapter’s topics.

9.1 Predeployment modifications of Aspire-hosted systems · 9.1.1 Running multiple instances of a service · 9.1.2 Running environment-specific services · 9.1.3 Managing database migrations · 9.1.4 Modifying the dashboard · 9.2 Preparing Aspire for deployment · 9.3 Deploying to Azure Container Apps · 9.3.1 Using the Azure Developer CLI · 9.3.2 Deploying from Visual Studio · 9.3.3 Obtaining the deployment files · 9.4 Converting Aspire manifest to Terraform · 9.5 Converting Aspire manifest to Kubernetes · 9.5.1 Using Aspir8 · 9.5.2 Deploying to a Kubernetes cluster · 9.6 Building CI/CD pipelines for Aspire · 9.6.1 Creating a GitHub Actions pipeline · 9.6.2 Creating an Azure DevOps pipeline · 9.6.3 Building pipelines for Kubernetes deployment · 9.7 Summary

What you learn in chapter 9 →

Chapter 10: Adding legacy apps to Aspire and working with AI agents

The chapter introduction explains why existing applications and AI coding assistants matter to Aspire, while previewing migration and integration topics.

10.1 Migrating old .NET Aspire projects · 10.1.1 Migrating from .NET Aspire 8 · 10.1.2 Migrating from .NET Aspire 9 to Aspire 13 · 10.2 Enrolling existing projects in Aspire orchestration · 10.3 Reconfiguring the infrastructure components · 10.4 Integrating Aspire with AI coding agents · 10.4.1 Configuring MCP in Aspire · 10.4.2 Using agentic AI to work with Aspire · 10.4.3 What are MCP and agentic tool calling? · 10.5 Closing thoughts · 10.6 Summary

What you learn in chapter 10 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.