Reputation: 2387
We have developed a Vehicle Tracking Application in MVC5 using EF6. The app has a dashboard on which current status of vehicle is displayed i.e. Moving / Stopped/ etc. To Load current status the dashboard view fires async ajax request(every 20 seconds) to fetch latest data.
Now, rather then making calls from client machine, I want that the client should automatically receive the update as soon as new data is available for its vehicle. It should not poll every 20 seconds.
I've read about SignalR, and tried implementing the Chat program. That's works well. But somehow, I'm unable to figure out "How to use it in my scenario?".
Also, I read about SQLDepedency to detect changes in DB, but again couldn't reach to a solution.
Will be glad, if someone can point me in right direction. Thanks.
Upvotes: 1
Views: 1058
Reputation: 7800
maysbe this link can help.
It is SOAP based but also express the fact taht you will have to implement a wbeservice like part on the device.
Upvotes: 0
Reputation: 4981
Some time ago I experimented with replacing polling with SignalR too. It was quite straightforward and I used mainly SignalR web as a source of information.
I remember I dealt with some serialization issues but it was more related to the message contract as we used a hierarchy of interfaces and implemented some inheritance in contracts (My question from that time).
Just a suggestion - plan well for scalability - how will your scenario work when you will have to scale out (if applicable) to multiple servers. For my high frequency messaging it was a no-go reason (My question from that time).
Upvotes: 1