v8.1.0-preview1
New features
Integration with Aspire
This release includes initial integration with Aspire Preview 3 and later, allowing you to configure an Orleans cluster in your Aspire app host, specifying the resources the cluster uses. For example, you can specify that an Azure Table will be used for cluster membership, an Azure Redis resource will be used for the grain directory, and an Azure Blob Storage resource will be used to store grain state. The integration currently support Redis and Azure Table & Blob storage resources. Support for other resources will be added later.
In the app host project, an Orleans cluster can be declared using the AddOrleans
method, and then configured with clustering, grain storage, grain directory, and other providers using methods on the returned builder:
var storage = builder.AddAzureStorage("storage");
var clusteringTable = storage.AddTables("clustering");
var defaultStorage = storage.AddBlobs("grainstate");
var cartStorage = builder.AddRedis("redis-cart");
var orleans = builder.AddOrleans("my-app")
.WithClustering(clusteringTable)
.WithGrainStorage("Default", grainStorage)
.WithGrainStorage("cart", cartStorage);
// Add a server project (also called "silo")
builder.AddProject<Projects.OrleansServer>("silo")
.WithReference(orleans);
// Add a project with a reference to the Orleans client
builder.AddProject<Projects.FrontEnd>("frontend")
.WithReference(orleans);
In the client and server projects, add Orleans to the host builder as usual.
// For an Orleans server:
builder.UseOrleans();
// Or, for an Orleans client:
builder.UseOrleansClient();
Orleans will read configuration created by your Aspire app host project and configure the providers specified therein. To allow Orleans to access the configured resources, add them as keyed services using the corresponding Aspire component:
builder.AddKeyedAzureTableService("clustering");
builder.AddKeyedAzureBlobService("grainstate");
builder.AddKeyedRedis("redis-cart");
Resource-optimized placement
Resource-optimized placement, enabled via the [ResourceOptimizedPlacement]
attribute on a grain class, balances grains across hosts based on available memory and CPU usage. For more details, see the PR: #8815.
What's Changed
- Clarify [AlwaysInterleave] interleaves with anything, including itself by @ReubenBond in #8804
- Adds
LinearBackoffClientConnectionRetryFilter
in the default client services by @ledjon-behluli in #8793 - Microsoft.Extensions.Configuration support by @ReubenBond in #8764
- Avoid constant try/catch on a non-existing gateway for external cluster client by @ledjon-behluli in #8792
- Add Analyzer and CodeFix for duplicate method aliases (ORLEANS0011) by @ledjon-behluli in #8662
- Adds code fixer for: Report error on duplicate [Id(x)] (ORLEANS0012) by @ledjon-behluli in #8808
- Make repeatable the execution of SQLServer Ado scripts without errors by @m3nax in #8799
GenerateAliasAttribtuesAnalyzer
needs to account for file-scoped namespaces by @ledjon-behluli in #8809- Add nightly feed publishing by @ReubenBond in #8810
- Update README.md to include new nightly build feed details by @ReubenBond in #8814
- Resource optimized placement strategy by @ledjon-behluli in #8815
- Upgrade
System.Data.SqlClient
by @ledjon-behluli in #8821 - Provide cross-platform environment statistics collection + Modify
OverloadDetector
to account for memory too by @ledjon-behluli in #8820 - Centralize environment statistics filtering by @ledjon-behluli in #8827
- Add support for enabling distributed tracing via configuration switch by @ReubenBond in #8829
- Add default Redis options when Redis is configured via keyed service by @ReubenBond in #8847
- Fix insert condition check in
RedisMembershipTable
by @ReubenBond in #8848 - Downgrade Microsoft.CodeAnalyis to v4.5.0 by @ReubenBond in #8849
New Contributors
Full Changelog: v8.0.0...v8.1.0-preview1