Tools and Skills for .NET 8 - Chapter 16, Cloud-Native Development Using .NET Aspire
Tools and Skills for .NET 8 - Chapter 16, Cloud-Native Development Using .NET Aspire

Tools and Skills for .NET 8 - Chapter 16, Cloud-Native Development Using .NET Aspire

This chapter is about cloud-native development using .NET Aspire, a new feature of .NET 8 and later that improves the local development experience when building distributed cloud-native solutions.

Introducing Aspire

What is .NET Aspire?

From the announcement blog post (https://devblogs.microsoft.com/dotnet/introducing-dotnet-aspire-simplifying-cloud-native-development-with-dotnet-8/), ".NET Aspire is an opinionated stack for building resilient, observable, and configurable cloud-native applications with .NET."

It is worth noting each carefully chosen phrase in that description:

  • Opinionated stack: One of the trickier aspects of building modern distributed solutions is there is too much choice. For each feature of your solution, there are multiple components that you could pick from. For each of those components, there are multiple ways to configure them based on your needs. Aspire has an opinion about which components you should use and how you should configure them, which is explained in the Aspire components section later in the chapter. If you concur with those opinions, then Aspire is especially great, and if not, you can always override the default configuration.
  • Resilient: Aspire is designed to be resilient by implementing best practices for cloud solutions, like implementing caching, queuing, and implementing fault tolerance using Polly.
  • Observable: Aspire enables tracing, logging, and metrics using the most popular telemetry framework for .NET and other platforms, OpenTelemetry. Aspire also includes a dashboard to monitor all activity across the many complex tiers of your solution.
  • Configurable: Aspire has sensible defaults for configuring all its components but is open to be configured however you want. Of course, you can override the defaults but if your needs are genuinely different, then you won't get as much out of Aspire as other developers who are happy to go along with the recommended components with their most popular configuration that works best for most distributed solutions.
  • Cloud-native: Aspire projects assume they will be eventually deployed to the cloud in containers. For local testing, Aspire projects have a dependency on Docker Desktop or Podman.

Aspire includes service discovery, telemetry, resilience, and health checks by default. Aspire simplifies the local developer experience and makes it easy to discover, acquire, and configure essential dependencies.

Aspire previews were first made available with the launch of .NET 8 in November 2023. Aspire "version 1.0" was released at the Microsoft Build conference on May 21, 2024, but it was versioned as 8.0 because Aspire is part of .NET 8.

Aspire 8.1 with improvements to the dashboard and APIs was released on July 23, 2024. You can read more about it's new features at the following link: https://devblogs.microsoft.com/dotnet/whats-new-in-aspire-8-1/

We can expect the next major version to ship with .NET 9 in November 2024 and be versioned as 9.0.

You can learn more about my book, Tools and Skills for .NET 8, and pre-order it, at the following link: https://www.amazon.com/Tools-Skills-NET-practices-solutions/dp/183763520X/

要查看或添加评论,请登录

Mark Price的更多文章

社区洞察

其他会员也浏览了