Interflare.Orleans.Marten.Reminders 0.0.4

dotnet add package Interflare.Orleans.Marten.Reminders --version 0.0.4
                    
NuGet\Install-Package Interflare.Orleans.Marten.Reminders -Version 0.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Interflare.Orleans.Marten.Reminders" Version="0.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Interflare.Orleans.Marten.Reminders" Version="0.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Interflare.Orleans.Marten.Reminders" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Interflare.Orleans.Marten.Reminders --version 0.0.4
                    
#r "nuget: Interflare.Orleans.Marten.Reminders, 0.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Interflare.Orleans.Marten.Reminders&version=0.0.4
                    
Install Interflare.Orleans.Marten.Reminders as a Cake Addin
#tool nuget:?package=Interflare.Orleans.Marten.Reminders&version=0.0.4
                    
Install Interflare.Orleans.Marten.Reminders as a Cake Tool

Orleans Marten providers

NuGet version of Interflare.Orleans.Marten.Clustering NuGet version of Interflare.Orleans.Marten.Persistence NuGet version of Interflare.Orleans.Marten.Reminders

Status of CI workflow Status of release workflow Latest release version

A Marten implementation of Orleans providers for membership (clustering), state storage, and reminder storage. It makes use of your existing Marten project configuration and database management, and has a slim setup that's easy to get started with.

Why this library

Orleans requires configuration of a backend storage provider in production to manage clustering and persist state. With Azure services, this is relatively easy to get set started through Azure Table Storage - you can just point your cluster at the service, and you've got a production-ready system.

If you're not hosting in Azure, the storage options are not as easy to get started with. The ADO .NET (SQL) provider, for example, requires setting up the database tables manually using loose SQL scripts you have to download and execute from several different places in the Orleans git repo.

This library is for applications which already use Marten as a data store in some way, or intend to use it - meaning that there is no additional or separate tooling to configure just to run Orleans. The library automatically extends and uses your existing Marten config with tables for running Orleans.

Installation

This repo publishes a package for each of the supported systems for Orleans, which you can add to your application as needed - install only the packages for the corresponding service you wish to back with Marten.

  • Membership: dotnet add package Interflare.Orleans.Marten.Clustering
  • State storage: dotnet add package Interflare.Orleans.Marten.Persistence
  • Reminders: dotnet add package Interflare.Orleans.Marten.Reminders

Configuration

There isn't much to configure, you only need to tell the Orleans silo to use the providers:

// Program.cs

var builder = WebApplication.CreateBuilder(args);

// Setup Orleans silo
builder.Host.UseOrleans(siloBuilder =>
{
    // Interflare.Orleans.Marten.Clustering:
    siloBuilder.UseMartenClustering();

    // Interflare.Orleans.Marten.Reminders:
    siloBuilder.UseMartenReminderService();

    // Interflare.Orleans.Marten.Persistence:
    siloBuilder.AddMartenGrainStorageAsDefault(); // or
    siloBuilder.AddMartenGrainStorage(name: "MyStorageName");
});


// Example Marten configuration
// see: https://martendb.io/configuration/hostbuilder.html
builder.Services.AddMarten(options =>
    {
        options.Connection(configuration.GetConnectionString("MyDatabase"));
    
        options.Schema.For<MyDocument1>();
        options.Schema.For<MyDocument2>();
    });

You will need to perform code generation (if needed) and run migrations on first use of these packages as well as any subsequent updates - as you would if you were creating and updating new tables of your own.

The Orleans provider configuration methods (UseMartenClustering() etc) will inject their Marten schema definitions into your existing configuration.

If you follow the Orleans recommendation to co-host your clients in the same process as the silos, you are ready to hit deploy and get going. These Marten providers will use the Orleans configuration for the ClusterOptions (service/cluster ids) as well as the serializers.

Should you be hosting your clients external to the silos in separate projects, you can configure the client projects with the Interflare.Orleans.Marten.Clustering library like so:

// Program.cs

var builder = WebApplication.CreateBuilder(args);

// Setup Orleans client
builder.Host.UseOrleansClient(clientBuilder =>
{
    // Interflare.Orleans.Marten.Clustering:
    clientBuilder.UseMartenClustering();
});

// You still need to configure Marten in your client projects
builder.Services.AddMarten(options =>
    {
        // ...
    });
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.4 155 4/19/2025
0.0.3 1,001 1/22/2025
0.0.2 170 1/16/2025
0.0.1 131 1/12/2025