SignalR

SignalR

Application and Data / Application Hosting / Realtime Backend / API
Needs advice
on
Microsoft TeamsMicrosoft TeamsSignalRSignalR
and
SlackSlack

Hi everyone! I am trying to implement a chat module in my product but it is not stable. My backend is in ASP.NET Core with EF Core, and my frontend is in Angular. Since I am already using dotnet, I used SignalR as a socket connection provider. At the moment, it works when the user logs in, the chats are loaded and the user is notified if there is any unread message just like any other app does by displaying a badge and number of unread chats. When the user navigates to chat, it loads the messages of chat. To avoid user waiting for messages I have stored the messages locally in a state management store and when the user switches the chat, it first loads messages from the store and then sends a request to server if there is any other message that is not on local.

The problem starts with multiple connections when single account is connected from multiple clients/browsers. From backend, I check if user is connected to SignalR socket then I send the message to all connections of user it does not work properly, this part is highly unstable. secondly, How can I improve the response of message loading? I only load 25 messages at the start.

Is there any article describing how Slack, Google Chat or MS Teams is handling the browser chat? it would be of great help.

Thanks

READ MORE
7 upvotes·30.1K views

Which option do you prefer to go with (considering scalability, and a limited budget):

Technologies in use: Angular / .NET Core 6

What do we want to achieve?

We want to create simple near-time web notifications, those notifications can be categorized into 2 sections:

  • User notification: which represents user activities and engagements.

  • System notification e.g release notes and maintenance time. The notification object is too simple just a title, body, userId, notificationStatus, and readAt. notification status is an enum with 3 values: unread, menuOpened, Read.

Options:

  1. use Firebase Realtime Database for user notifications and Microsoft SQL Server for system notifications (maybe using long poling or so to frequently call the getSystemNotification API ).

  2. use SignalR to push new notifications along with the SqlServer database and store both user and system into one table (as they almost have the same attributes)

READ MORE
4 upvotes·174.7K views
Needs advice
on
FirebaseFirebasePusherPusher
and
SignalRSignalR
in

I'm working on a project where I need to both send real-time updates for specific data sets, along with providing notifications to the users after long-running processes have been completed (SSE).

The project is using .NET Framework, AngularJS, & MSSQL. I understand that SignalR is nice as a polyfill for .NET and you can scale with a backplane, but I was wondering if there was a more efficient/effective technology for this?

READ MORE
10 upvotes·36.1K views
Needs advice
on
gRPCgRPC
and
SignalRSignalR

We need to interact from several different Web applications (remote) to a client-side application (.exe in .NET Framework, Windows.Console under our controlled environment). From the web applications, we need to send and receive data and invoke methods to client-side .exe on javascript events like users onclick. SignalR is one of the .Net alternatives to do that, but it adds overhead for what we need. Is it better to add SignalR at both client-side application and remote web application, or use gRPC as it sounds lightest and is multilingual?

SignalR or gRPC are always sending and receiving data on the client-side (from browser to .exe and back to browser). And web application is used for graphical visualization of data to the user. There is no need for local .exe to send or interact with remote web API. Which architecture or framework do you suggest to use in this case?

READ MORE
5 upvotes·559.4K views
Replies (1)
Recommends
on
SignalR
at

SignallR is not a strict contract based protocol like Grpc, its a framework for bidirectional client-server communication and by far the most versatile one. where as Grpc is on the other performance optimized point to point communication RPC, clients need to be agree on a schema/contract and is cross platform performance. it comes with pain of handling incompatible types and having to do a lot of modeling work and versioning; If you are not into c++ stack or so and mostly leaning to .net and js as your primary stack: I would say stick with Signalr for now.

If interoperability is something that you are looking into stick with signalR / socketIo etc ,al so they can do pub sub and all magic tricks (absent in GRpc it is not designed for it) if performance and cool thing to try GRpc

Note: MesasgePack over SignalR is faster than or equal to GRpc,

Dragons Ahead : SignalR and GRpc work on two different Http versions so hosting them under a single process is not going to work: Do take a look into Deepstream IO.

READ MORE
3 upvotes·2.8K views