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 418 12/21/2023
7.2.110 336 12/1/2023
7.2.108 115 12/1/2023
7.2.107 536 11/14/2023
7.2.105 129 11/14/2023
7.2.104 111 11/14/2023
7.2.103 144 11/8/2023
7.2.102 111 11/8/2023
7.2.101 111 11/8/2023
7.2.100 111 11/8/2023
7.2.99 101 11/8/2023
7.2.97 621 11/2/2023
7.2.96 123 11/2/2023
7.2.93 166 9/27/2023
7.2.92 130 9/27/2023
7.2.91 140 9/25/2023
7.2.90 122 9/25/2023
7.2.89 131 9/25/2023
7.2.88 130 9/25/2023
7.2.87 135 9/25/2023
7.2.86 113 9/21/2023
7.2.85 138 9/21/2023
7.2.83 103 9/21/2023
7.2.82 131 9/21/2023
7.2.81 138 9/20/2023
7.2.80 144 9/14/2023
7.2.79 121 9/13/2023
7.2.78 142 9/13/2023
7.2.76 170 9/11/2023
7.2.75 156 9/4/2023
7.2.74 119 9/1/2023
7.2.73 132 9/1/2023
7.2.69 149 8/29/2023
7.2.67 145 8/22/2023
7.2.65 151 8/4/2023
7.2.63 146 8/4/2023
7.2.61 168 8/3/2023
7.2.60 170 8/3/2023
7.2.54 157 8/2/2023
1.0.53 164 8/2/2023
1.0.50 139 8/2/2023
1.0.49 157 8/1/2023
1.0.48 165 8/1/2023
1.0.47 145 8/1/2023
1.0.46 163 8/1/2023
1.0.45 142 7/31/2023
1.0.44 148 7/28/2023
1.0.43 156 7/27/2023
1.0.42 159 7/27/2023
1.0.41 165 7/27/2023
1.0.40 135 7/27/2023
1.0.34 142 7/26/2023
1.0.21 156 7/25/2023
1.0.20 160 7/25/2023
1.0.19 167 7/25/2023
1.0.17 153 7/25/2023
1.0.16 149 7/25/2023
1.0.15 168 7/24/2023
1.0.14 155 7/21/2023
1.0.12 170 7/21/2023
1.0.11 147 7/21/2023
1.0.10 121 7/20/2023
1.0.9 181 7/20/2023
1.0.8 159 7/20/2023
1.0.6 177 7/20/2023
1.0.0 155 7/20/2023