0

i need to update client on any changes occurred on server. for that i found 2 approach. 1. using ajax which is also known as reverse ajax for this purpose. 2. using COMET.

but i don't know exact difference in both.

my site contains news content and i want that news to be automatically updates when new news is entered by my CMS application. i have got hundreds of concurrent users on my web application.

please suggest me which approach should i use to get best solution. also please provide me good example's like for that so that i can implement it.

NOTE: i am using .net framework 2.0 but if its not possible in 2.0 then can also move to 3.5

Thanks.

Dr. Rajesh Rolen
  • 14,029
  • 41
  • 106
  • 178

1 Answers1

2

First start with YAGNI principle. See if it is ok for your client to update periodically, lets say every min or every 30 seconds. Consider things like how much information users can process in this interval. Also take a look at popular news site and how they implement this feature. In this case you are better off using the pull model where your client updates itself by requesting data from server. Implementing a push model is much more complicated.

Once you are sure that you need the push model, IMO comet is a better option. Coment is designed for this purpose. Dojo Foundation's CometD is a widely used library for this purpose. One good example is the live chess application on chess.com

Also, though I am not 100% sure about this, I believe you will need to use technologies like ASP.NET MVC which will allow you more control on the markup generated by your web app so that you can use these libraries.

Community
  • 1
  • 1
Unmesh Kondolikar
  • 9,256
  • 4
  • 38
  • 51