AJAX - The Complete Reference

(avery) #1

PART II


Chapter 6: Networking Considerations 281


more continuous connection by modifying the communications style from a pull/poll style to
a push/stream style. There are tremendous implications on server load with Comet and it is
certainly not appropriate for all applications, but it truly warrants an in-depth discussion
later on.

Summary


The Internet hasn’t gotten to be any less reliable with Ajax, but the network’s pre-existing
rough edges might be viewed differently by users who are promised richness and speed
and now get to experience the occasional network error as well. The past batch nature of
Web applications in combination with interface assistance from Web browsers and users
alike has often shielded developers from dealing with the multitude of network problems.
With timeouts, retries, and simple slow responses, there is plenty to go wrong on a single
request. When you add in the likelihood that many requests may happen at once, all sorts of
challenges and sequencing and queuing concerns arise. Performance is always paramount,
so content should be compressed, cached, and segmented appropriately. Nearly all the
techniques presented in this chapter were wrapped into the previously introduced AjaxTCR
library, which hopefully will be a useful learning tool to experiment with as you explore
Ajax further. With these features, the library has become capable of handling numerous
network concerns. We will continue to add to it over the next few chapters, as we move
farther from theory and more to practice.
Free download pdf