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#.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.