0

What is the most efficient way to get live updates from an online sevrer without DDOSing it or slowing down the client application?

*I heard about long-polling once but I'm not sure if it's the best way or how to implement it in C#.

Dan Barzilay
  • 4,974
  • 5
  • 27
  • 39
  • 1
    SignalR has long polling... be worth looking at that? – Alex Dec 18 '12 at 18:13
  • 1
    Use different servers to notify the availability of updates and to distribute them. Distribution can be done by means of a flexible (adaptative) mechanism, such as a cloud of servers. You could even use geographically distributed mirrors (and selection of mirror based on geoIP) to notify about updates. – jap1968 Dec 18 '12 at 18:19
  • @jap1968 thanks but my issue is not knowing how to get that data the most efficient way.. using WebClient each milisecound doenst sounds so efficient.. and i cant think of any other way. – Dan Barzilay Dec 18 '12 at 18:23

1 Answers1

2

I guess that nowadays the easiest and most efficient to do it is using SignalR.

There is a very good video from NDC 2012 that can get you up and running in no time.

It downgrades gracefully from websockets to long polling and forever frame depending on the client and infrastructure.

The other option that might work depending on the frequency and number of users connected is poll the data every X seconds. To reduce the connection overhead in the app server you can disable or reduce the keep alive time.

tucaz
  • 6,524
  • 6
  • 37
  • 60