In: Computer Science
The realtime results are available on the server in a database. What would the effects of browser and server caching, and I'll be using AJAX, and how would I estimate the load this will put on the site in terms of hit rate and bandwidth consumption.
AJAX, provides a framework that allows the client to contact the server with the requests. By using AJAX there is no need to update the entire page for example like validations in textboxes and radio button,checkboxes and the user will get the information from the server on demand.AJAX provides a rich user experience.Thus we should expect that AJAX will impose a performance penalty on our application servers. Ajax calls are like any other http request that might be used to build a web page.The main advantage of Ajax is caching,it helps to access the content immediately.It is same as http caching.
Band width consumption:
With client-side rendering your initial load will be and feel heavier: again, more JavaScript and a 2nd request. However, subsequent updates will require less bandwidth. JSON is pretty verbose, but it's probably less verbose than HTML with classes and ids. This is an area where client-side rendering will be faster (if we ignore the fact that we client-side rendering still needs to spend time transforming the JSON to HTML).However, both HTML and JSON should compress quite well.
I'm legitimately drawing a blank trying to come up with a pattern where the JSON data would be significantly smaller. If it's a collection of data (like search results), it'll just be the same divs with the same class name...much like it'll be the same JSON fields. I guess client-side rendering might have a real edge if you are using Word to generate your html...
Hit rate:
A hit is a request to a web server for a file, like a web page, image, JavaScript, or Cascading Style Sheet. When a web page is downloaded from a server the number of "hits" or "page hits" is equal to the number of files requested.