1

I'm trying to use SignalR to create a real time notification like facebook I'm using c# as server side language 1- i read the wiki in github and I know that I can notify only the connected user my main goal is to use the signalR with sql to get data from database and notify the connected user 2- i know I should use sql dependencies class but the example I see on the internet is about MVC and my project isn't MVC it's pure web site

Can anyone help me with an example for how to achieve this ?

reference about signalR :

https://github.com/SignalR/SignalR/wiki/Hubs

appreciate your help

Javier Brooklyn
  • 624
  • 3
  • 9
  • 25
Sora
  • 2,465
  • 18
  • 73
  • 146

1 Answers1

0

You can use a database to persist data but with SignalR there's no need to poll data from the database in order to provide "push" notifications.

On the server side of things, whenever a client say "sends a message" just use the SignalR server to notify anyone who's currently connected that needs to be notified

In the case that you want to notify a user who is offline, persist that data to the database and then on the initial logon of the offline user pull that data and notify them accordingly.

A good sample for utilizing SignalR for push notifications (chat messages) and still persisting data is JabbR: https://github.com/davidfowl/JabbR

N. Taylor Mullen
  • 18,061
  • 6
  • 49
  • 72
  • you provided an answer that i actually now my problem is not in the concept i have a problem in the implementation – Sora Feb 07 '13 at 07:17