Microsoft Orleans Grain Directory provider backed by Azure Storage
$ dotnet add package Microsoft.Orleans.GrainDirectory.AzureStorageMicrosoft Orleans Grain Directory for Azure Storage provides a grain directory implementation using Azure Storage. The grain directory is used to locate active grain instances across the cluster, and this package allows Orleans to store that information in Azure Storage.
To use this package, install it via NuGet:
dotnet add package Microsoft.Orleans.GrainDirectory.AzureStorage
using Microsoft.Extensions.Hosting;
using Orleans.Hosting;
var builder = Host.CreateApplicationBuilder(args)
.UseOrleans(siloBuilder =>
{
siloBuilder
.UseLocalhostClustering()
// Configure Azure Storage as grain directory
.UseAzureStorageGrainDirectoryAsDefault(options =>
{
options.ConnectionString = "YOUR_AZURE_STORAGE_CONNECTION_STRING";
options.TableName = "GrainDirectory";
});
});
// Run the host
await builder.RunAsync();
For more comprehensive documentation, please refer to: