Reccomended approach for sending messages from ASP.NET backend server to TypeScript web front-end?
^
6 Replies
It usually goes the other way
But if you want to send data from backend to frontend, without frontend requesting it, use SignalR
Yes I know, but I'm looking to develop an app that essentially can send a "command" from one PC to another PC.
My initial thoughts are to run an ASP.NET server in a container and then have a desktop app that runs on each PC which connects to it.
These "commands" can be one shot messages or they can also be toggled on and off. Desktop clients can setup reactions to do whatever on its PC (like mute and unmute microphone)
The web front-end will visualize the commands being sent and which toggles are currently on/off.
Would you reccomend SignalR over gRPC?
gRPC could work as well, sure
I went with SignalR because it's a first-party solution
Okay cool thanks, my initial thought was also SignalR, but I was looking into gRPC a bit because it could essentially generate the message classes from a protobuf file in both C# and TypeScript.
Not sure if SignalR has similar capability in this regard.
That's awesome, thank you, much appreciated!