Orleans.Streaming.Grains 8.0.115-rc1

This is a prerelease version of Orleans.Streaming.Grains.
dotnet add package Orleans.Streaming.Grains --version 8.0.115-rc1
NuGet\Install-Package Orleans.Streaming.Grains -Version 8.0.115-rc1
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="Orleans.Streaming.Grains" Version="8.0.115-rc1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Orleans.Streaming.Grains --version 8.0.115-rc1
#r "nuget: Orleans.Streaming.Grains, 8.0.115-rc1"
#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.
// Install Orleans.Streaming.Grains as a Cake Addin
#addin nuget:?package=Orleans.Streaming.Grains&version=8.0.115-rc1&prerelease

// Install Orleans.Streaming.Grains as a Cake Tool
#tool nuget:?package=Orleans.Streaming.Grains&version=8.0.115-rc1&prerelease

Why?

This library allows you to use Grains Storage as a storage layer for Persistent Streams. Our benchmarks show 10% speed advantage over MemoryStreams.

Orleans.Streaming.Grains

NuGet

This is a Streaming Provider that uses Orleans' built-in StatefulGrain system for queuing messages. The extra added value of this project is the FireAndForgetDelivery option which can be disabled for tests, so they are easier to write with TestCluster.

Usage

In production you should register the provider using the extension method for ISiloBuilder. It is also required to add Grains storage providers for actual state and for subscriptions. The example below uses MemoryGrainStorage which should not be used if you require the stream queues to be persistent.

siloBuilder.AddMemoryGrainStorageAsDefault()
           .AddMemoryGrainStorage(ProviderConstants.DEFAULT_PUBSUB_PROVIDER_NAME)
           .AddGrainsStreams(name: ProviderConstants.DEFAULT_STORAGE_PROVIDER_NAME,
                             queueCount: 1,
                             retry: TimeSpan.FromMinutes(1),
                             poison: TimeSpan.FromMinutes(3));

In test you should register the provider using the extension method for ISiloBuilder. It is also required to add Grains storage providers for actual state and for subscriptions. The example below uses MemoryGrainStorage which should not be used if you require the stream queues to be persistent. In this situation, every OnNextAsync invocation can be awaited and the code will wait until that message is completed by all subscribers.

siloBuilder.ConfigureServices(Configure)
           .AddMemoryGrainStorageAsDefault()
           .AddMemoryGrainStorage(ProviderConstants.DEFAULT_PUBSUB_PROVIDER_NAME)
           .AddGrainsStreamsForTests(name: ProviderConstants.DEFAULT_STORAGE_PROVIDER_NAME,
                                     queueCount: 3,
                                     retry: TimeSpan.FromSeconds(1),
                                     poison: TimeSpan.FromSeconds(3));

Compromise

In high throughput and high volume environments you will want to collect the TransactionItemGrain objects early so they don't overload the memory of your silo. Use the below configuration and adjust it to your requirements:

siloBuilder.Configure<GrainCollectionOptions>(options =>
{
    options.CollectionAge = TimeSpan.FromMinutes(1);
    options.CollectionQuantum = TimeSpan.FromSeconds(5);
    options.ClassSpecificCollectionAge[typeof(TransactionItemGrain<>).FullName] = options.CollectionQuantum * 2;
});

Project Contents:

  • Orleans.Streaming.Grains implements the Grain Stream Provider.
  • Orleans.Streaming.Grains.Test test the Grain Stream Provider in an Orleans TestingHost.

Make sure to open the project folder in VS Code with Remote - Containers extension enabled.

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. 
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
8.0.115-rc1 200 12/21/2023
7.2.110 230 12/1/2023
7.2.108 84 12/1/2023
7.2.107 285 11/14/2023
7.2.105 95 11/14/2023
7.2.104 83 11/14/2023
7.2.103 110 11/8/2023
7.2.102 77 11/8/2023
7.2.101 90 11/8/2023
7.2.100 76 11/8/2023
7.2.99 74 11/8/2023
7.2.97 283 11/2/2023
7.2.96 95 11/2/2023
7.2.93 133 9/27/2023
7.2.92 96 9/27/2023
7.2.91 103 9/25/2023
7.2.90 108 9/25/2023
7.2.89 98 9/25/2023
7.2.88 94 9/25/2023
7.2.87 109 9/25/2023
7.2.86 95 9/21/2023
7.2.85 101 9/21/2023
7.2.83 83 9/21/2023
7.2.82 94 9/21/2023
7.2.81 108 9/20/2023
7.2.80 129 9/14/2023
7.2.79 106 9/13/2023
7.2.78 109 9/13/2023
7.2.76 135 9/11/2023
7.2.75 120 9/4/2023
7.2.74 104 9/1/2023
7.2.73 110 9/1/2023
7.2.69 128 8/29/2023
7.2.67 115 8/22/2023
7.2.65 129 8/4/2023
7.2.63 120 8/4/2023
7.2.61 143 8/3/2023
7.2.60 137 8/3/2023
7.2.54 132 8/2/2023
1.0.53 140 8/2/2023
1.0.50 122 8/2/2023
1.0.49 123 8/1/2023
1.0.48 138 8/1/2023
1.0.47 122 8/1/2023
1.0.46 138 8/1/2023
1.0.45 117 7/31/2023
1.0.44 121 7/28/2023
1.0.43 125 7/27/2023
1.0.42 132 7/27/2023
1.0.41 132 7/27/2023
1.0.40 116 7/27/2023
1.0.34 117 7/26/2023
1.0.21 129 7/25/2023
1.0.20 133 7/25/2023
1.0.19 143 7/25/2023
1.0.17 140 7/25/2023
1.0.16 123 7/25/2023
1.0.15 140 7/24/2023
1.0.14 130 7/21/2023
1.0.12 138 7/21/2023
1.0.11 114 7/21/2023
1.0.10 110 7/20/2023
1.0.9 154 7/20/2023
1.0.8 122 7/20/2023
1.0.6 143 7/20/2023
1.0.0 121 7/20/2023