Friday, August 31st, 2007

Ajax View: Remotely Monitoring Client-side Web App Performance and Behavior

Category: JavaScript, Utility

Emre Kıcıman and Benjamin Livshits of Microsoft research have created a new project called Ajax View:

The goal of the Ajax View project is to improve developer’s visibility into and control over their web applications’ behaviors on end-user’s desktops.

The Ajax View approach is to insert a server-side proxy (or web server plugin) in-between the web server machines and the end-user’s browser. This proxy captures the web application’s JavaScript code as it is being sent to a browser and rewrites the code to insert extra instrumentation code. The injected instrumentation code runs with the rest of the web application inside the end-user’s browser and can capture performance, call graph, application state and user interaction information, providing visibility directly into the last hop of the user’s experience.

Because Ajax View is rewriting web application code dynamically each time a user visits the web site, it can:

  1. Serve different instrumentation code to different users. This allows us to distribute instrumentation code across many users, spreading the cost of gathering lots of information such that no single user pays a high performance penalty.
  2. Adapt an instrumentation policy and serve different instrumentation code over time. For example, we can drill-down into performance problems and gather extra context about bugs

The prototype will setup a local proxy server that rewrites your script code and instruments it.

A crude view is:


  1. <script>
  2. LogScriptEnter(); // ADDED
  4. function HelloWorld( a, b ) {
  5.     LogFuncEnter(“HelloWorld”); // ADDED
  6.     alert(‘hello world!’);
  7.     LogFuncExit(“HelloWorld”)); // ADDED
  8. }
  10. LogScriptExit(); // ADDED
  11. </script>

This is all just research-y and they “are considering several future directions for the project, including further research into instrumentation policies to help developers debug their application, and the possibilities of integrating this technology into developer tools and/or web server infrastracture.”

This seems a little weak, although it is just a research project. Someone we all know well and love said this about the project: “with MS Research I would expect a Firebug clone with voice recognition: computer, select the 4th div after the second h2 in the third paragraph”

Posted by Dion Almaer at 1:31 am

3.3 rating from 40 votes


Comments feed TrackBack URI

This is a very interesting approach, I hope they can make it work.

Comment by Martin — August 31, 2007

I’ve installed and played around with this prototype. The documentation is really spare, and the transparency it offers as a profile into function-level performance is quite subpar, when measured against Firebug’s profiler. I’m also very much unsatisfied with its implementation as a proxy server; I for one would never attempt to talk my operations staff into installing yet another potential bottleneck into our production server stack.

Comment by David Golightly — August 31, 2007

Leave a comment

You must be logged in to post a comment.