slaw
slaw

Reputation: 621

Sending signals from a remote server to a .NET application

I have a .NET application which sends PHP GET and POST requests to my server (on an AWS EC-2 instance).

I now have a need for the local application to know in real-time when an event on the server happens. Basically two "accounts" are linked and they need to synchronize, so when one makes a change on the server, then the server must send a signal to the other to update it's "view".

I'm aware that I could achieve this by constantly querying to server to check for changes, but that seems horrendous.

Could someone please point in the right direction here?

Thanks!

Upvotes: 0

Views: 196

Answers (1)

Mohanraja
Mohanraja

Reputation: 188

Certainly you could use signalR, signalR can be hosted like website, when your client starts it can connect to this signalR website. SiganlR should be hosted separately from your server application.

Let say A,B client and your Server application got connected to signalR. Now when A modifies something using post method to your PHP server, PHP server then can invoke a method in signalR , then signalR can broadcast message to all the clients connected. You can use group concept in signalR to target specific audience.

enter image description here

Upvotes: 1

Related Questions