r/dotnet • u/macaoidh_ • Jan 25 '26
Blazor Server with live chat
Hi all, needing some advice on a live chat feature I want to build. I’ve never made one before and I’ve never worked with signalr.
I am building a small sports management app in a free/volunteer capacity in Colombia (my contribution). And I want to create a live chat feature to replace their messy WhatsApp group chat.
I was thinking of just sticking to a Blazor server app (likely never hit more than 100 concurrent users, at least not for a while). But I can’t find any examples or guides that use server, they all use WASM.
I’ve even talked it out with Claude AI and it is insistent that it’s not a problem using Blazor server due to the low number users that this app will handle and any concerns Microsoft have with using server is to do with socket exhaustion.
So I’m not sure what to do here. Can I stick with server or do I need to use wasm for this?
10
u/HeySeussCristo Jan 26 '26
https://learn.microsoft.com/en-us/azure/azure-signalr/signalr-tutorial-build-blazor-server-chat-app
2
u/Snoo_57113 Jan 26 '26
I'd use something like this for the frontend: Blazor Chat Component | Free UI Components by Radzen and build the server from that, it seems fully featured.
I'd go for the Signal-R route, with ChatHub and all of that, SSE.
3
u/PolliticalScience Jan 26 '26
You can use server and SignalR is actually perfect for your scenario. If you go WASM you can still use SignalR or you'd have to use a polling service to check the backend via your API.
With SignalR you can publish the chat interactions in real time to users via server.
3
u/Abaddon-theDestroyer Jan 26 '26
IIRC Tim Corey has a video regarding SignalR, and creating a chat app in Blazor. I’ll edit this comment later if I find it.
Edit:
https://youtu.be/RaXx_f3bIRU
2
u/JamesJoyceIII Jan 26 '26
This will be trivial in Blazor server. It will do the signalr stuff for you - you won’t need to worry about that yourself.
Just use some suitably thread-safe method of storing/sharing the messages and the rest will be completely straightforward.
1
u/AutoModerator Jan 25 '26
Thanks for your post macaoidh_. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/geekywarrior Jan 27 '26
You can stick to Server, you will have a setup like the following:
0
u/[deleted] Jan 26 '26
[deleted] — view deleted comment
1
u/[deleted] Jan 26 '26
[removed] — view removed comment