Web API - Event Notification

Viewed 6369

I need a way for clients (C# applications) of a ASP.NET Web API to be notified of certain changes via the Web API. They don't even need to know what the changes are, just need to get a notification that something changed (at that point it's up to the client to call the API to get any specific data they may need after getting the notification). I'm not sure what a good way of accomplishing this would look like.

I'm thinking one way might be to create events and somehow have the client subscribe to those events, but I don't know how to do that through Web API.

I found some mentions of SignalR on Google, but this seems like a lot of work to implement and seems to do a lot more than I need.

All I need is for the Web API to be able to tell the client "something changed, come and get it". However, I want to avoid polling. What is the fastest/easiest way to do accomplish this?

5 Answers

Google firebase can also be used for this. You can write firebase code in your client application(javascript or mobile app etc.) which can be triggered whenever any change occurs on firebase. So whenever something happens on your server hit the firebase url and that will raise the event which can be caught on the client side.

May be it can help.

Related