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 LESS
7 upvotes·27.5K views
Avatar of arham-anees