Click here to Skip to main content
15,900,461 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
I want to know if there is a technique to use SignalR to get notifications when there is a CREATE, UPDATE And DELETE operation on any of my tables in the database. This way I can cache database data and issue a new cache request whenever SignalR sends a notification. The challenge is SignalR notifications are configured per table and I want it to work for the entire database.

What I have tried:

N/A
Posted
Updated 14-Dec-16 7:02am
v2
Comments
F-ES Sitecore 14-Dec-16 4:41am    
So you have a problem with something that you haven't said what it is, or how it works, or what tech it uses, or shown sample code of things that don't perform well...what kind of advice are you expecting to get? Do you think there is a "Work faster" setting in IIS that you're missing? If your code is performing badly then identify what exactly is performing badly and ask how you can improve it.

1 solution

You have two options.

You can configure a notification for each table you want to monitor, basically having SignalR handle all of that stuff for you.

Or you're going to have to write a layer into your server code that handles ALL database access for your clients. That way you get to send SignalR notifications for anything you want. Your clients would have to interact with this layer or another application layer above it that interacts with the database layer. Even your server-side code would have to go through this layer if it's going to involve notifying clients of any changes.
 
Share this answer
 
Comments
Admire Mhlaba 14-Dec-16 23:24pm    
Thank you for being kind enough to respond to my question. Kindly share some links with related content for me to read up please. I haven't done anything like this before so I need some tutorials to guide.
Dave Kreskowiak 14-Dec-16 23:46pm    
Google for "SignalR tutorial", there's tons of them.

As for a database layer, there's tons of MVC tutorials that handle database operations.

After you understand both, you're just putting the pieces together.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900