The slickness and responsiveness of Web applications such as Google Maps and Flickr have set off a wave of enterprise interest in the Web scripting components known collectively as Asynchronous JavaScript + XML.
The elements of AJAX - including JavaScript, Dynamic HTML and asynchronous XML - have been around for more than five years. However, a slew of high-profile implementations and the coining of the term “AJAX” in a February 2005 essay by consultant Jesse James Garrett put the technologies squarely in the spotlight.
As more and more developers try their hand at AJAX applications, network optimization veterans are warning the technologies that make these rich, interactive programs work can put a strain on networks.
Alagu Periyannan, CTO at WAN optimization vendor Blue Coat Systems, says many developers are unaware of the network inefficiencies inherent in many AJAX applications, in part because tool kits designed to streamline AJAX development mask these qualities. “These tool kits are hiding the work that happens over the network from the developers,” he says.
That can lead to surprises later. “What will happen is someone will test an application on the LAN and see that it works great, then they will deploy it to the branch offices and issues will start happening,” Periyannan says. “They will find they need to do some more efficient things in their network and application delivery infrastructure to be able to alleviate some of these issues.”
Part of what makes AJAX applications inefficient in terms of network usage is their reliance on polling technologies that keep content fresh without requiring end users to request updated information. “In the background, though the user isn’t necessarily hitting a button on a page, the application is creating a lot of network traffic by polling the back end,” Periyannan says.
But in a lot of cases the polling doesn’t result in new data being served to the client, he points out. In a situation like this, traditional caching technologies can help make an AJAX application more efficient: If content hasn’t changed, caching devices can avoid resending an object unnecessarily.
Compression technologies also can be useful with AJAX applications, to deal with XML’s verbosity, Periyannan says. “XML is a very useful format from an interoperability point of view, however it is kind of heavy in terms of the language used. There are a lot of redundant tags.”
Another significant characteristic of AJAX applications is that, in a lot of cases, they don’t use persistent connections, Periyannan says. “Typical browsers open up three or four connections and then reuse those connections to fetch all the objects. But a lot of the newer AJAX-based tool kits, as part of their polling and chattiness, seem to be opening up and closing new connections, which actually introduces quite a lot of overhead.”
To offset this, enterprises can deploy proxy technologies or client-side technologies to convert a lot of those opening-and-closing connections to persistent connections. “That‘s something that will help with AJAX applications,” Periyannan says.