Search code examples
c#.netrestsignalrdata-stream

Best way to push data to connected users from .NET web application


the scenario is the following :

-We have a MVC web application with an in-memory database providing users with a set of features. -We created a REST web api in that application that an android application consumes to provide the same services to mobile users.

Given that we also have data that are frequently updated (live soccer) ,what is the best way to send updates to all connected mobile devides ?

These data are fed to the application through an external api and users of the web application are notified using SignalR clients.I guess we probably need a data streaming service that utilizes sockets ,but which one available is best suited for the given scenario and the technologies used ??

Thanks in advance .


Solution

  • If you don't want your mobile app to either poll or maintain a dedicated connection because both drain the battery, you should use android's dedicated push mechanism ("Firebase Cloud Messaging", formerly "Google Cloud Messaging").

    https://firebase.google.com/docs/cloud-messaging