All Projects → OrleansContrib → Signalr.orleans

OrleansContrib / Signalr.orleans

Licence: mit
SignalR backend based on Orleans.

Projects that are alternatives of or similar to Signalr.orleans

Azure Signalr
Azure SignalR Service SDK for .NET
Stars: ✭ 137 (-12.18%)
Mutual labels:  aspnet-core, real-time, signalr
ChatService
ChatService (SignalR).
Stars: ✭ 26 (-83.33%)
Mutual labels:  real-time, aspnet-core, signalr
Aspnetboilerplate
ASP.NET Boilerplate - Web Application Framework
Stars: ✭ 10,061 (+6349.36%)
Mutual labels:  aspnet-core, dotnet-core
Cronscheduler.aspnetcore
Cron Scheduler for AspNetCore 2.x/3.x or DotNetCore 2.x/3.x Self-hosted
Stars: ✭ 100 (-35.9%)
Mutual labels:  aspnet-core, dotnet-core
Sio.core
✔ [ SIOC ] Swastika I/O Core is an all in one platform (e.g CMS, eCommerce, Forum, Q&A, CRM...) ASP.NET Core / Dotnet Core System based on SIOH Framework.
Stars: ✭ 121 (-22.44%)
Mutual labels:  signalr, dotnet-core
Aspnetcore Practice
ASP.NET Core 專案練習集合,ASP.NET Core Practice Projects
Stars: ✭ 80 (-48.72%)
Mutual labels:  aspnet-core, dotnet-core
Dotnetcore Microservices Poc
Very simplified insurance sales system made in a microservices architecture using .NET Core
Stars: ✭ 1,304 (+735.9%)
Mutual labels:  signalr, dotnet-core
Comboost
ComBoost是一个领域驱动的快速开发框架
Stars: ✭ 111 (-28.85%)
Mutual labels:  aspnet-core, dotnet-core
Mangosta Ios
MongooseIM client for iOS
Stars: ✭ 28 (-82.05%)
Mutual labels:  realtime-messaging, real-time
Signalw
Even simpler and faster real-time web for ASP.NET Core.
Stars: ✭ 125 (-19.87%)
Mutual labels:  real-time, signalr
Giraffe
Giraffe is an F# micro web framework for building rich web applications. It has been heavily inspired and is similar to Suave, but has been specifically designed with ASP.NET Core in mind and can be plugged into the ASP.NET Core pipeline via middleware. Giraffe applications are composed of so called HttpHandler functions which can be thought of a mixture of Suave's WebParts and ASP.NET Core's middleware.
Stars: ✭ 1,703 (+991.67%)
Mutual labels:  aspnet-core, dotnet-core
Wopihost
ASP.NET Core MVC implementation of the WOPI protocol. Enables integration with WOPI clients such as Office Online Server.
Stars: ✭ 132 (-15.38%)
Mutual labels:  aspnet-core, dotnet-core
Aspnetauthorizationworkshop
A workshop for moving through the various new pieces in ASP.NET Core Authorization
Stars: ✭ 1,046 (+570.51%)
Mutual labels:  aspnet-core, dotnet-core
Orleanstestkit
Unit Test Toolkit for Microsoft Orleans
Stars: ✭ 42 (-73.08%)
Mutual labels:  orleans, dotnet-core
Signalrsimplechat
.NET 5 - ASP.NET Core 5 SignalR Simple Chat
Stars: ✭ 95 (-39.1%)
Mutual labels:  aspnet-core, signalr
Server
The core infrastructure backend (API, database, Docker, etc).
Stars: ✭ 8,797 (+5539.1%)
Mutual labels:  signalr, dotnet-core
Applozic Ios Sdk
iOS Real Time Chat & Messaging SDK
Stars: ✭ 104 (-33.33%)
Mutual labels:  realtime-messaging, real-time
Awesome Microservices Netcore
💎 A collection of awesome training series, articles, videos, books, courses, sample projects, and tools for Microservices in .NET Core
Stars: ✭ 865 (+454.49%)
Mutual labels:  aspnet-core, dotnet-core
Chatify
A Laravel package that allows you to add a complete user messaging system into your new/existing Laravel application.
Stars: ✭ 885 (+467.31%)
Mutual labels:  realtime-messaging, real-time
Reactivetradercloud
Real-time FX trading showcase by Adaptive.
Stars: ✭ 1,664 (+966.67%)
Mutual labels:  real-time, dotnet-core

SignalR.Orleans

SignalR.Orleans

Build Package Version NuGet Downloads License Gitter

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

Installation is performed via NuGet

From Package Manager:

PS> Install-Package SignalR.Orleans

.Net CLI:

# dotnet add package SignalR.Orleans

Paket:

# paket add SignalR.Orleans

Configuration

Silo

We need to configure the Orleans Silo with the below:

  • Use .UseSignalR() on ISiloHostBuilder.
  • Make sure to call RegisterHub<THub>() where THub is the type of the Hub you want to be added to the backplane.

Example

var silo = new SiloHostBuilder()
  .UseSignalR()
  .RegisterHub<MyHub>() // You need to call this per `Hub` type.
  .AddMemoryGrainStorage("PubSubStore") // You can use any other storage provider as long as you have one registered as "PubSubStore".
  .Build();

await silo.StartAsync();

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(cfg =>
{
  cfg.ConfigureBuilder = (builder, config) =>
  {
    builder
      .AddMemoryGrainStorage(config.PubSubProvider)
      .AddMemoryGrainStorage(config.StorageProvider);
  };
})
.RegisterHub<MyHub>()

Client

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

  • Use .UseSignalR() on IClientBuilder.

Example

var client = new ClientBuilder()
  .UseSignalR()
  .Build();

await client.Connect();

Somewhere in your Startup.cs:

  • Add IClusterClient (created in the above example) to IServiceCollection.
  • Use .AddSignalR() on IServiceCollection (this is part of Microsoft.AspNetCore.SignalR nuget package).
  • Use AddOrleans() on .AddSignalR().

Example

public void ConfigureServices(IServiceCollection services)
{
  ...
  services
    .AddSingleton<IClusterClient>(client)
    .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!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].