Cloud Native application framework for .NET
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, 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: https://github.com/dotnet/orleans/pull/8815.
ResourceOptimizedPlacementOptions
to Orleans.Configuration
by @ledjon-behluli in https://github.com/dotnet/orleans/pull/8892
StatelessWorkerAttribute.MaxLocal
property is accounted for by @ReubenBond in https://github.com/dotnet/orleans/pull/8885
PooledBuffer
serialization by @ReubenBond in https://github.com/dotnet/orleans/pull/8852
RuntimeContext
to previous value after use by @ReubenBond in https://github.com/dotnet/orleans/pull/8864
LinearBackoffClientConnectionRetryFilter
in the default client services by @ledjon-behluli in https://github.com/dotnet/orleans/pull/8793
GenerateAliasAttribtuesAnalyzer
needs to account for file-scoped namespaces by @ledjon-behluli in https://github.com/dotnet/orleans/pull/8809
System.Data.SqlClient
by @ledjon-behluli in https://github.com/dotnet/orleans/pull/8821
OverloadDetector
to account for memory too by @ledjon-behluli in https://github.com/dotnet/orleans/pull/8820
RedisMembershipTable
by @ReubenBond in https://github.com/dotnet/orleans/pull/8848
Full Changelog: https://github.com/dotnet/orleans/compare/v8.0.0...v8.1.0
ResourceOptimizedPlacementOptions
to Orleans.Configuration
by @ledjon-behluli in https://github.com/dotnet/orleans/pull/8892
StatelessWorkerAttribute.MaxLocal
property is accounted for by @ReubenBond in https://github.com/dotnet/orleans/pull/8885
Full Changelog: https://github.com/dotnet/orleans/compare/v8.1.0-preview2...v8.1.0-preview3
Full Changelog: https://github.com/dotnet/orleans/compare/v7.2.5...v7.2.6
PooledBuffer
serialization by @ReubenBond in https://github.com/dotnet/orleans/pull/8852
RuntimeContext
to previous value after use by @ReubenBond in https://github.com/dotnet/orleans/pull/8864
Full Changelog: https://github.com/dotnet/orleans/compare/v8.1.0-preview1...v8.1.0-preview2
PooledBuffer
serialization & initialize ActivationMigrationManager on startup by @ReubenBond in https://github.com/dotnet/orleans/pull/8861
Full Changelog: https://github.com/dotnet/orleans/compare/v7.2.4...v7.2.5
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, 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: https://github.com/dotnet/orleans/pull/8815.
LinearBackoffClientConnectionRetryFilter
in the default client services by @ledjon-behluli in https://github.com/dotnet/orleans/pull/8793
GenerateAliasAttribtuesAnalyzer
needs to account for file-scoped namespaces by @ledjon-behluli in https://github.com/dotnet/orleans/pull/8809
System.Data.SqlClient
by @ledjon-behluli in https://github.com/dotnet/orleans/pull/8821
OverloadDetector
to account for memory too by @ledjon-behluli in https://github.com/dotnet/orleans/pull/8820
RedisMembershipTable
by @ReubenBond in https://github.com/dotnet/orleans/pull/8848
Full Changelog: https://github.com/dotnet/orleans/compare/v8.0.0...v8.1.0-preview1
EndpointOptions
by @IEvangelist in https://github.com/dotnet/orleans/pull/8209
AddJsonSerializer
by @ReubenBond in https://github.com/dotnet/orleans/pull/8228
Collection<T>
serialization codec by @ReubenBond in https://github.com/dotnet/orleans/pull/8238
IGrainStorageSerializer
for memory grain storage by @shoneefd in https://github.com/dotnet/orleans/pull/8250
DeleteStateOnClear
for Redis grain storage. by @ReubenBond in https://github.com/dotnet/orleans/pull/8296
PooledArrayBufferWriter.AsMemory
by @ReubenBond in https://github.com/dotnet/orleans/pull/8300
IGrainFactory.GetGrain<T>
for unimplemented generic interfaces by @ReubenBond in https://github.com/dotnet/orleans/pull/8301
ActivationWorkingSet
by @ReubenBond in https://github.com/dotnet/orleans/pull/8321
null
in constructor by @bradygaster in https://github.com/dotnet/orleans/pull/8358
FormatterServices
to RuntimeHelpers
in preparation for .NET 8 by @ReubenBond in https://github.com/dotnet/orleans/pull/8362
DefaultOptionsFormatter
and DefaultOptionsFormatterResolver
by @ReubenBond in https://github.com/dotnet/orleans/pull/8384
DefaultStreamIdMapper
by @nichvolodov in https://github.com/dotnet/orleans/pull/8378
IAsyncEnumerable<T>
support for grain calls by @ReubenBond in https://github.com/dotnet/orleans/pull/8416
PooledArrayBufferWriter
more versatile, rename by @ReubenBond in https://github.com/dotnet/orleans/pull/8453
void
methods: VoidRequest
implies OneWay
by @ReubenBond in https://github.com/dotnet/orleans/pull/8468
HostApplicationBuilder
extensions by @IEvangelist in https://github.com/dotnet/orleans/pull/8466
UsingDirective
insertion in [NonSerialized]
codefix by @ReubenBond in https://github.com/dotnet/orleans/pull/8557
readonly
where applicable by @ReubenBond in https://github.com/dotnet/orleans/pull/8587
required
members by @ReubenBond in https://github.com/dotnet/orleans/pull/8595
[RegexImplicitChannelSubscription(...)]
and [RegexImplicitStreamSubscription(...)]
by @ReubenBond in https://github.com/dotnet/orleans/pull/8597
ImplicitStreamSubscriptionAttribute.StreamIdMapper
to be initialized by subclasses by @ReubenBond in https://github.com/dotnet/orleans/pull/8592
ClusterMembershipOptions.NumVotesForDeathDeclaration
is not greater than NumProbedSilos
on startup by @ReubenBond in https://github.com/dotnet/orleans/pull/8679
CollectionAgeLimitAttribute
by @ReubenBond in https://github.com/dotnet/orleans/pull/8681
Service
comment by @qin-guan in https://github.com/dotnet/orleans/pull/8745
CompoundTypeAliasTree
with isolated base interface(s) by @ledjon-behluli in https://github.com/dotnet/orleans/pull/8788
Full Changelog: https://github.com/dotnet/orleans/compare/v7.0.0...v8.0.0
CompoundTypeAliasTree
with isolated base interface(s) by @ledjon-behluli in https://github.com/dotnet/orleans/pull/8788
Full Changelog: https://github.com/dotnet/orleans/compare/v8.0.0-rc1...v8.0.0-rc2
EndpointOptions
by @IEvangelist in https://github.com/dotnet/orleans/pull/8209
AddJsonSerializer
by @ReubenBond in https://github.com/dotnet/orleans/pull/8228
Collection<T>
serialization codec by @ReubenBond in https://github.com/dotnet/orleans/pull/8238
IGrainStorageSerializer
for memory grain storage by @shoneefd in https://github.com/dotnet/orleans/pull/8250
DeleteStateOnClear
for Redis grain storage. by @ReubenBond in https://github.com/dotnet/orleans/pull/8296
PooledArrayBufferWriter.AsMemory
by @ReubenBond in https://github.com/dotnet/orleans/pull/8300
IGrainFactory.GetGrain<T>
for unimplemented generic interfaces by @ReubenBond in https://github.com/dotnet/orleans/pull/8301
ActivationWorkingSet
by @ReubenBond in https://github.com/dotnet/orleans/pull/8321
null
in constructor by @bradygaster in https://github.com/dotnet/orleans/pull/8358
FormatterServices
to RuntimeHelpers
in preparation for .NET 8 by @ReubenBond in https://github.com/dotnet/orleans/pull/8362
DefaultOptionsFormatter
and DefaultOptionsFormatterResolver
by @ReubenBond in https://github.com/dotnet/orleans/pull/8384
DefaultStreamIdMapper
by @nichvolodov in https://github.com/dotnet/orleans/pull/8378
IAsyncEnumerable<T>
support for grain calls by @ReubenBond in https://github.com/dotnet/orleans/pull/8416
PooledArrayBufferWriter
more versatile, rename by @ReubenBond in https://github.com/dotnet/orleans/pull/8453
void
methods: VoidRequest
implies OneWay
by @ReubenBond in https://github.com/dotnet/orleans/pull/8468
HostApplicationBuilder
extensions by @IEvangelist in https://github.com/dotnet/orleans/pull/8466
UsingDirective
insertion in [NonSerialized]
codefix by @ReubenBond in https://github.com/dotnet/orleans/pull/8557
readonly
where applicable by @ReubenBond in https://github.com/dotnet/orleans/pull/8587
required
members by @ReubenBond in https://github.com/dotnet/orleans/pull/8595
[RegexImplicitChannelSubscription(...)]
and [RegexImplicitStreamSubscription(...)]
by @ReubenBond in https://github.com/dotnet/orleans/pull/8597
ImplicitStreamSubscriptionAttribute.StreamIdMapper
to be initialized by subclasses by @ReubenBond in https://github.com/dotnet/orleans/pull/8592
ClusterMembershipOptions.NumVotesForDeathDeclaration
is not greater than NumProbedSilos
on startup by @ReubenBond in https://github.com/dotnet/orleans/pull/8679
CollectionAgeLimitAttribute
by @ReubenBond in https://github.com/dotnet/orleans/pull/8681
Service
comment by @qin-guan in https://github.com/dotnet/orleans/pull/8745
Other changes have been backported to 7.x
Service
comment by @qin-guan in https://github.com/dotnet/orleans/pull/8745
Full Changelog: https://github.com/dotnet/orleans/compare/v7.0.0...v8.0.0-rc1
Full Changelog: https://github.com/dotnet/orleans/compare/v7.2.3...v7.2.4