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.
SignalR.Orleans is a package that allow us to enhance the real-time capabilities of SignalR by leveraging Orleans distributed cloud platform capabilities.
Installation is performed via NuGet
From Package Manager:
PS> Install-Package SignalR.Orleans -Version 1.0.0-preview-1
.Net CLI:
# dotnet add package SignalR.Orleans --version 1.0.0-preview-1
Packet:
# paket add SignalR.Orleans --version 1.0.0-preview-1
First we need to have an Orleans cluster up and running.
var siloConfg = ClusterConfiguration.LocalhostPrimarySilo().AddSignalR();
var silo = new SiloHostBuilder()
.UseConfiguration(siloConfg)
.UseSignalR()
.Build();
await silo.StartAsync();
Now your SignalR aplication needs to connect to the Orleans Cluster by using an Orleans Client.
var clientConfig = ClientConfiguration.LocalhostSilo()
.AddSignalR();
var client = new ClientBuilder()
.UseConfiguration(clientConfig)
.UseSignalR()
.Build();
await client.Connect();
Somewhere in your Startup.cs
:
public void ConfigureServices(IServiceCollection services)
{
...
services.AddSignalR()
.AddOrleans(client);
...
}
Great! Now you have an Orleans backplane built in Orleans!
PRs and feedback is very welcome!