1

My Scenario is that I have a HTML5 web application that shows a bunch of icons on Google Maps. The client is pure AngularJS/Javascript, the backend is a web service of WebAPI, Entity Framework and SQL.

The client currently uses an $interval mechanism to call the web service every X number of seconds and updates the icons. this works well, but i'd like to make the updates real time.

So i was reading about WebSockets & SignalR but am still confused about how they work behind the scenes. Are these the right tools for the job at all? I'm looking for tips about where to start and maybe a recommendation of a good demo for this.

kob490
  • 3,177
  • 4
  • 25
  • 40

1 Answers1

2

SignalR is the way to go.

More or less it just open a connection between backend and frontend, so your backend throws messages to fronted instead of frontend polling backend for results.

So instead of Polling no awnser, Polling no awnser, Polling no awnser, Polling result!

You get.

Connection open. 5 seconds. Backend sends message to client.

try reading: http://www.asp.net/signalr/overview/getting-started/introduction-to-signalr

Kiksen
  • 1,559
  • 1
  • 18
  • 41