Zoltan Hernyak
Zoltan Hernyak

Reputation: 1239

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.

Upvotes: 2

Views: 2342

Answers (2)

wnutt
wnutt

Reputation: 549

Have a look at SQL Server's Query Notification.

Upvotes: 3

Waleed
Waleed

Reputation: 1188

You can do a lot of things actually. Its more like a project management architecture related question.

You can connect your user B to a group which sends information to all its connected clients when available. You can use two of the following, there maybe more.

  1. SignalR - Real time communication between server and clients
  2. FireBase - By Google for real-time apps

Upvotes: 0

Related Questions