net8.0
Microsoft Orleans clustering provider backed by AWS DynamoDB
Published
Jun 4, 2025
1y ago
Total Downloads
1.4M
1,358,398
Install
dotnet add package Microsoft.Orleans.Clustering.DynamoDB --version 9.2.0-preview2
| Product | Versions |
|---|---|
| .NET |
README
Microsoft Orleans Clustering for DynamoDB
Introduction
Microsoft Orleans Clustering for DynamoDB provides cluster membership functionality for Microsoft Orleans using Amazon's DynamoDB. This allows Orleans silos to coordinate and form a cluster using DynamoDB as the backing store.
Getting Started
To use this package, install it via NuGet:
dotnet add package Microsoft.Orleans.Clustering.DynamoDB
Example - Configuring DynamoDB Membership
using Microsoft.Extensions.Hosting;
using Orleans.Hosting;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Threading.Tasks;
namespace ExampleGrains;
// Define a grain interface
public interface IHelloGrain : IGrainWithStringKey
{
Task<string> SayHello(string greeting);
}
// Implement the grain interface
public class HelloGrain : Grain, IHelloGrain
{
public Task<string> SayHello(string greeting)
{
return Task.FromResult($"Hello, {greeting}!");
}
}
var builder = Host.CreateApplicationBuilder(args)
.UseOrleans(siloBuilder =>
{
siloBuilder
// Configure DynamoDB clustering
.UseDynamoDBClustering(options =>
{
options.AccessKey = "YOUR_AWS_ACCESS_KEY";
options.SecretKey = "YOUR_AWS_SECRET_KEY";
options.Region = "us-east-1";
options.TableName = "OrleansClusteringTable";
options.CreateIfNotExists = true;
});
});
var host = builder.Build();
await host.StartAsync();
// Get a reference to a grain and call it
var client = host.Services.GetRequiredService<IClusterClient>();
var grain = client.GetGrain<IHelloGrain>("user123");
var response = await grain.SayHello("DynamoDB");
// Print the result
Console.WriteLine($"Grain response: {response}");
// Keep the host running until the application is shut down
await host.WaitForShutdownAsync();
Documentation
For more comprehensive documentation, please refer to:
- Microsoft Orleans Documentation
- Configuration Guide
- Orleans Clustering
- AWS SDK for .NET Documentation
Feedback & Contributing
- If you have any issues or would like to provide feedback, please open an issue on GitHub
- Join our community on Discord
- Follow the @msftorleans Twitter account for Orleans announcements
- Contributions are welcome! Please review our contribution guidelines
- This project is licensed under the MIT license
Changes from Previous Version
v9.2.0-preview1v9.2.0-preview2
Added Dependencies
Microsoft.Orleans.Analyzers(net8.0)
Microsoft.Orleans.CodeGenerator(net8.0)
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.The published metadata declares 29 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.