v8.1.0
New features
Integration with Aspire
This release includes initial integration with .NET Aspire, 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 supports 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
Since 8.1.0-preview3
- Migrate to build template by @benjaminpetit in #8905
- Remove mention of build.sh from README.md by @ardrabczyk in #8901
- Fix build template for nightly by @benjaminpetit in #8909
- Add mirror pipeline by @benjaminpetit in #8918
- Fix nightly nuget publishing by @benjaminpetit in #8919
- Fix mirror pipeline by @benjaminpetit in #8923
- Do not trigger mirror for PR by @benjaminpetit in #8924
- Enable TCP keep-alive on all sockets by default by @ReubenBond in #8927
- Fix typos in SQSStorage.cs by @Malpp in #8933
- Add more tests for [Alias("x")] attribute by @ReubenBond in #8926
- Update Azure.Identity by @ReubenBond in #8942
- Serialization doc fixes, add missing tests, fix PooledBufferCodec by @ReubenBond in #8943
- Fix some reference documentation warnings by @ReubenBond in #8941
- Always read grain state during activation if it has not been rehydrated by @ReubenBond in #8944
Additional changes since 8.0.0
- Clean up WorkItemGroup and ActivationTaskScheduler logic by @ReubenBond in #8865
- Orleans is now officially supported by Microsoft by @ReubenBond in #8882
- Avoid over-counting stateless worker activations by @ReubenBond in #8886
- Move
ResourceOptimizedPlacementOptions
toOrleans.Configuration
by @ledjon-behluli in #8892 - Guard against null grain context in test code by @ReubenBond in #8897
- Use GrainDirectoryCacheFactory to construct a IGrainDirectoryCache by @Mostafa-Goher in #8844
- Ensure
StatelessWorkerAttribute.MaxLocal
property is accounted for by @ReubenBond in #8885 - Make EventHub tests more reliable by @benjaminpetit in #8889
- Fix
PooledBuffer
serialization by @ReubenBond in #8852 - Prepare the FabricBot config for migration to Policy Service by @jeffhandley in #8855
- Address IDE0038. Use pattern matching. by @IEvangelist in #8619
- Always reset
RuntimeContext
to previous value after use by @ReubenBond in #8864 - Distributed Tracing: Use recommended conventions by @ReubenBond in #8856
- FabricBot: Onboarding to GitOps.ResourceManagement because of FabricBot decommissioning by @dotnet-policy-service in #8869
- 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
- @ardrabczyk made their first contribution in #8901
- @Malpp made their first contribution in #8933
- @Mostafa-Goher made their first contribution in #8844
- @dotnet-policy-service made their first contribution in #8869
- @m3nax made their first contribution in #8799
Full Changelog: v8.0.0...v8.1.0