Orleans.Streaming.Grains
7.2.110
See the version list below for details.
dotnet add package Orleans.Streaming.Grains --version 7.2.110
NuGet\Install-Package Orleans.Streaming.Grains -Version 7.2.110
<PackageReference Include="Orleans.Streaming.Grains" Version="7.2.110" />
paket add Orleans.Streaming.Grains --version 7.2.110
#r "nuget: Orleans.Streaming.Grains, 7.2.110"
// Install Orleans.Streaming.Grains as a Cake Addin #addin nuget:?package=Orleans.Streaming.Grains&version=7.2.110 // Install Orleans.Streaming.Grains as a Cake Tool #tool nuget:?package=Orleans.Streaming.Grains&version=7.2.110
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
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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net7.0
- Microsoft.Orleans.Streaming (>= 7.2.3)
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 | 411 | 12/21/2023 |
7.2.110 | 334 | 12/1/2023 |
7.2.108 | 113 | 12/1/2023 |
7.2.107 | 508 | 11/14/2023 |
7.2.105 | 127 | 11/14/2023 |
7.2.104 | 108 | 11/14/2023 |
7.2.103 | 141 | 11/8/2023 |
7.2.102 | 108 | 11/8/2023 |
7.2.101 | 104 | 11/8/2023 |
7.2.100 | 108 | 11/8/2023 |
7.2.99 | 99 | 11/8/2023 |
7.2.97 | 587 | 11/2/2023 |
7.2.96 | 121 | 11/2/2023 |
7.2.93 | 163 | 9/27/2023 |
7.2.92 | 128 | 9/27/2023 |
7.2.91 | 138 | 9/25/2023 |
7.2.90 | 120 | 9/25/2023 |
7.2.89 | 129 | 9/25/2023 |
7.2.88 | 128 | 9/25/2023 |
7.2.87 | 133 | 9/25/2023 |
7.2.86 | 111 | 9/21/2023 |
7.2.85 | 136 | 9/21/2023 |
7.2.83 | 101 | 9/21/2023 |
7.2.82 | 128 | 9/21/2023 |
7.2.81 | 136 | 9/20/2023 |
7.2.80 | 141 | 9/14/2023 |
7.2.79 | 118 | 9/13/2023 |
7.2.78 | 140 | 9/13/2023 |
7.2.76 | 168 | 9/11/2023 |
7.2.75 | 154 | 9/4/2023 |
7.2.74 | 116 | 9/1/2023 |
7.2.73 | 129 | 9/1/2023 |
7.2.69 | 148 | 8/29/2023 |
7.2.67 | 140 | 8/22/2023 |
7.2.65 | 149 | 8/4/2023 |
7.2.63 | 144 | 8/4/2023 |
7.2.61 | 166 | 8/3/2023 |
7.2.60 | 168 | 8/3/2023 |
7.2.54 | 155 | 8/2/2023 |
1.0.53 | 162 | 8/2/2023 |
1.0.50 | 137 | 8/2/2023 |
1.0.49 | 155 | 8/1/2023 |
1.0.48 | 163 | 8/1/2023 |
1.0.47 | 143 | 8/1/2023 |
1.0.46 | 161 | 8/1/2023 |
1.0.45 | 140 | 7/31/2023 |
1.0.44 | 146 | 7/28/2023 |
1.0.43 | 152 | 7/27/2023 |
1.0.42 | 157 | 7/27/2023 |
1.0.41 | 161 | 7/27/2023 |
1.0.40 | 133 | 7/27/2023 |
1.0.34 | 140 | 7/26/2023 |
1.0.21 | 154 | 7/25/2023 |
1.0.20 | 158 | 7/25/2023 |
1.0.19 | 165 | 7/25/2023 |
1.0.17 | 149 | 7/25/2023 |
1.0.16 | 147 | 7/25/2023 |
1.0.15 | 164 | 7/24/2023 |
1.0.14 | 153 | 7/21/2023 |
1.0.12 | 168 | 7/21/2023 |
1.0.11 | 145 | 7/21/2023 |
1.0.10 | 119 | 7/20/2023 |
1.0.9 | 177 | 7/20/2023 |
1.0.8 | 155 | 7/20/2023 |
1.0.6 | 175 | 7/20/2023 |
1.0.0 | 153 | 7/20/2023 |