Sketch7.SignalR.Orleans 8.0.0

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Sketch7.SignalR.Orleans --version 8.0.0
                    
NuGet\Install-Package Sketch7.SignalR.Orleans -Version 8.0.0
                    
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="Sketch7.SignalR.Orleans" Version="8.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sketch7.SignalR.Orleans" Version="8.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Sketch7.SignalR.Orleans" />
                    
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 Sketch7.SignalR.Orleans --version 8.0.0
                    
#r "nuget: Sketch7.SignalR.Orleans, 8.0.0"
                    
#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.
#:package Sketch7.SignalR.Orleans@8.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Sketch7.SignalR.Orleans&version=8.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Sketch7.SignalR.Orleans&version=8.0.0
                    
Install as a Cake Tool

<p align="center"> <img src="https://github.com/dotnet/orleans/blob/gh-pages/assets/logo.png" alt="SignalR.Orleans" width="300px"> <h1>Sketch7 SignalR.Orleans</h1><small>fork from <a href="https://github.com/OrleansContrib/SignalR.Orleans">OrleansContrib/SignalR.Orleans</a></small> </p>

Package build/publish NuGet version

Orleans is a framework that provides a straight-forward approach to building distributed high-scale computing applications, without the need to learn and apply complex concurrency or other scaling patterns.

ASP.NET Core SignalR is a new library for ASP.NET Core developers that makes it incredibly simple to add real-time web functionality to your applications. What is "real-time web" functionality? It's the ability to have your server-side code push content to the connected clients as it happens, in real-time.

Sketch7.SignalR.Orleans is a package that allow us to enhance the real-time capabilities of SignalR by leveraging Orleans distributed cloud platform capabilities.

Installation

Installation is performed via NuGet

dotnet support

Version .NET Orleans Status
1.x netcore2 2.3.5
2.x netcore3 3.2.0
3.x net5 3.5.1
4.x net6 3.6.0 CI
5.x net7 7.2.4 CI
6.x net8 8.0.0 CI
7.x net8 9.0.1 CI
8.x net10 9.2.1 CI

From Package Manager:

PS> Install-Package Sketch7.SignalR.Orleans PS> Install-Package Sketch7.SignalR.Orleans.AspNet

.Net CLI:

# dotnet add package Sketch7.SignalR.Orleans # dotnet add package Sketch7.SignalR.Orleans.AspNet

Paket:

# paket add Sketch7.SignalR.Orleans # paket add Sketch7.SignalR.Orleans.AspNet

Configuration

Silo

We need to configure the Orleans Silo with the below:

  • Use .UseSignalR() on ISiloHostBuilder.

Example

new HostBuilder()
  .UseOrleans((context, siloBuilder) =>
  {
    siloBuilder
      .AddMemoryGrainStorage("PubSubStore") // You can use any other storage provider as long as you have one registered as "PubSubStore".
      .UseSignalR();
  });

Configure Silo Storage Provider and Grain Persistance

Optional configuration to override the default implementation for both providers which by default are set as Memory.

Example

.UseSignalR(signalrBuilder => signalrBuilder.Configure((sb, opts) =>
{
  siloBuilder.AddMemoryGrainStorage(opts.StorageProvider);
}));

Client

Now your SignalR application needs to connect to the Orleans Cluster by using an Orleans Client:

  • Use .UseSignalR() on IClientBuilder.

Example

var hostBuilder = new HostBuilder()
  .UseOrleans((ctx, builder) =>
  {
    builder.UseSignalR()
  });

hostBuilder.RunConsoleAsync();

Somewhere in your Startup.cs:

  • Add the following in ConfigureServices.
  • Use .AddSignalR() on IServiceCollection (this is part of Microsoft.AspNetCore.SignalR nuget package).
  • Use AddOrleans() on .AddSignalR().

Example

public void ConfigureServices(IServiceCollection services)
{
  ...
  services
    .AddSignalR()
    .AddOrleans();
  ...
}

Great! Now you have SignalR configured and Orleans SignalR backplane built in Orleans!

Features

Hub Context

HubContext gives you the ability to communicate with the client from orleans grains (outside the hub).

Sample usage: Receiving server push notifications from message brokers, web hooks, etc. Ideally first update your grain state and then push signalr message to the client.

Example

public class UserNotificationGrain : Grain<UserNotificationState>, IUserNotificationGrain
{
  private HubContext<IUserNotificationHub> _hubContext;

  public override async Task OnActivateAsync()
  {
    _hubContext = GrainFactory.GetHub<IUserNotificationHub>();
    // some code...
    await _hubContext.User(this.GetPrimaryKeyString()).Send("Broadcast", State.UserNotification);
  }
}

Contributions

PRs and feedback are very welcome!

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (1)

Showing the top 1 NuGet packages that depend on Sketch7.SignalR.Orleans:

Package Downloads
Sketch7.SignalR.Orleans.AspNet

Orleans backplane for SignalR Core.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.1-dev.205 602 11/28/2025
8.0.1-dev.203 210 11/27/2025
8.0.0 491 11/21/2025
8.0.0-dev.199 321 11/21/2025
8.0.0-dev.198 315 11/21/2025
8.0.0-dev.197 387 11/18/2025
8.0.0-dev.195 387 11/18/2025
7.0.0-dev.191 118 1/20/2025
7.0.0-dev.188 107 1/20/2025
7.0.0-dev.185 117 1/20/2025
7.0.0-dev.182 121 1/16/2025
6.0.1 673 1/20/2025
6.0.0 260 1/15/2025
6.0.0-dev.178 89 1/15/2025
6.0.0-dev.172 7,613 2/3/2024
6.0.0-dev.170 123 2/2/2024
6.0.0-dev.166 130 1/16/2024
5.0.0 364 1/15/2024
5.0.0-dev.163 148 1/15/2024
5.0.0-dev.162 116 1/15/2024
Loading failed