Search code examples
c#sql-server.net-corepolling

Polling SQL - is there any better solution?


I have to implement a functionality, where client A sends some information to the server (which stores it to an SQL db), and client B wants to retrieve that piece of information. To do so, client B calls a WCF function, which waits for the information (for a long time, until a timeout happens, or the information arrives).

What is the best practice to implement the WCF function? Polling the SQL db to query if the information is there or not? Is there any SQL DB side functionality to help?

The WCF must be written in C# (.NET CORE is preferred). The SQL server is not chosen yet, preferred MS SQL or an Azure solution, but can be other sql server which fits for the .NET CORE.


Solution

  • Have a look at SQL Server's Query Notification.