Back to Orleans

Microsoft Orleans Grain Directory for Azure Storage

src/Azure/Orleans.GrainDirectory.AzureStorage/README.md

10.1.02.0 KB
Original Source

Microsoft Orleans Grain Directory for Azure Storage

Introduction

Microsoft 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.

Getting Started

To use this package, install it via NuGet:

shell
dotnet add package Microsoft.Orleans.GrainDirectory.AzureStorage

Example - Configuring Azure Storage Grain Directory

csharp
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();

Documentation

For more comprehensive documentation, please refer to:

Feedback & Contributing