# Managedcode Orleans Signalr

Integrate ManagedCode.Orleans.SignalR for grain-driven SignalR delivery, connection and...

- Repository: https://github.com/managedcode/dotnet-skills (500 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add managedcode/dotnet-skills --skill managedcode-orleans-signalr -g -a claude-code -y`
Codex: `npx skills add managedcode/dotnet-skills --skill managedcode-orleans-signalr -g -a codex -y`
Cursor: `npx skills add managedcode/dotnet-skills --skill managedcode-orleans-signalr -g -a cursor -y`
Gemini CLI: `npx skills add managedcode/dotnet-skills --skill managedcode-orleans-signalr -g -a gemini-cli -y`

## Description

Integrate ManagedCode.Orleans.SignalR for grain-driven SignalR delivery, connection and group routing, offline user queues, and restart-safe state. USE FOR: Orleans backplane setup, grain-to-hub publishing, reconnect, heartbeat, and client-invocation failures. DO NOT USE FOR: ordinary SignalR without Orleans or unrelated persistence. INVOKES: inspect configuration, implement the integration, and validate connected-client delivery.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# ManagedCode.Orleans.SignalR

## Trigger On

- configuring an Orleans SignalR backplane or sending messages from grains
- diagnosing connection, group, or user routing across hosts
- upgrading offline delivery, heartbeat persistence, or client invocation handling

## Install

For a host that runs both the silo and SignalR endpoint:

```bash
dotnet add package ManagedCode.Orleans.SignalR.Server --version 10.3.0
dotnet add package ManagedCode.Orleans.SignalR.Client --version 10.3.0
```

For separate hosts, put Server on the silo and Client on the ASP.NET Core endpoint. Core supplies shared contracts transitively. Keep versions and partition options aligned across participants; preserve central package management when present.

## Configure the Backplane

A combined local development host can use the memory provider:

```csharp
using ManagedCode.Orleans.SignalR.Server.Extensions;
using Microsoft.AspNetCore.SignalR;

var builder = WebApplication.CreateBuilder(args);
builder.Host.UseOrleans(silo =>
{
    silo.UseLocalhostClustering();
    silo.ConfigureOrleansSignalR();
    silo.AddOrleansSignalRInMemoryStorage();
});
builder.Services.AddSignalR().AddOrleans(options =>
{
    options.ConnectionPartitionCount = 4;
    options.GroupPartitionCount = 4;
    options.KeepMessageInterval = TimeSpan.FromMinutes(5);
    options.MaxQueuedMessagesPerUser = 100;
});

var app = builder.Build();
app.MapHub<UpdatesHub>("/updates");
app.Run();

public sealed class UpdatesHub : Hub { }
```

The rest: https://github.com/managedcode/dotnet-skills/blob/HEAD/catalog/Libraries/ManagedCode-Orleans-SignalR/skills/managedcode-orleans-signalr/SKILL.md
