Skip to content

ravendb/Orleans.Providers.RavenDB

Repository files navigation

RavenDB-Orleans Provider

Build NuGet License

📌 Overview

RavenDB-Orleans Provider is a Microsoft Orleans storage provider that integrates RavenDB as a backing store for grain persistence, reminders, and clustering.

This provider enables high-performance, distributed applications that leverage the event-driven, distributed actor model of Orleans with the scalability and flexibility of RavenDB.


🚀 Features

Grain Storage – Persist and retrieve Orleans grain states using RavenDB.
Reminders Provider – Stores Orleans timers and reminders in RavenDB.
Clustering Support – Uses RavenDB for Orleans cluster membership management.
Optimized Queries – Efficient indexing and querying using RavenDB’s built-in indexing.
Fully Asynchronous – Non-blocking, highly scalable storage provider.
.NET 8 Support – Fully compatible with the latest Orleans & .NET 8.


🔧 Configuration

var host = Host.CreateDefaultBuilder(args)
	.UseOrleans(siloBuilder =>
	{
		// Define RavenDB connection settings
		string serverUrl = "http://localhost:8080";
		string databaseName = "OrleansDemo";

		siloBuilder
			// Configure clustering with RavenDB
			.UseRavenDbMembershipTable(options =>
			{
				options.Urls = new[] { serverUrl };
				options.DatabaseName = databaseName;
			})
			// Configure grain storage with RavenDB
			.AddRavenDbGrainStorage("RavenGrainStorage", options =>
			{
				options.Urls = new[] { serverUrl };
				options.DatabaseName = databaseName;
			})
			// Configure reminders with RavenDB
			.AddRavenDbReminderTable(options =>
			{
				options.Urls = new[] { serverUrl };
				options.DatabaseName = databaseName;
			})
			// Configure other Orleans settings
			.Configure<ClusterOptions>(options =>
			{
				options.ClusterId = "dev";
				options.ServiceId = "OrleansDemo";
			})
			.Configure<EndpointOptions>(options =>
			{
				options.AdvertisedIPAddress = IPAddress.Loopback;
				options.SiloPort = 11111;
				options.GatewayPort = 30000;
			})
			.ConfigureLogging(logging => logging.AddConsole());
	}).Build();

await host.RunAsync();

📦 Installation

You can install the package via NuGet:

dotnet add package Orleans.Providers.RavenDb

To build the project locally, run:

pwsh ./build.ps1

or (on Linux/macOS)

./build.sh

📖 Documentation Links

About

Orleans providers for RavenDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published