Helpful Little Tattletale
Remember the kid on the school playground who spent recess reporting other kids to the teacher? That kid didn’t win a lot of popularity contests. Microsoft, however, recently released a tattletale that’s certain to become a popular sidekick for enterprise developers. The little squealer, known as the Visual Studio Analyzer, should greatly simplify the debugging and tuning of component-oriented and distributed applications.
A tattletale, of course, can only become popular if there are some really nasty bullies on whom to tattle. In our case, the nasty bullies are Window’s DNA (Distributed interNet Applications Architecture) applications. With DNA tools such as COM, Microsoft Transaction Server (MTS) and Microsoft Message Queue (MSMQ), Microsoft has made it much easier to create three-tier applications. But the challenge of scaling these applications and tweaking their performance remains difficult.
In the upcoming COM+ world, both programmers and systems administrators will have access to dozens of control points that change how a component performs. Once you’ve created a multiple component solution and tweaked a number of MTS attributes, you may have created a bully in your Window’s playground. This bully may unexpectedly start grabbing lunch money (resources) from other kids (programs). In fact, this bully may even create a whole gang of lunch-money grabbing clones. On a playground like this, you really need a good tattletale.
Tattletales are nothing new to programmers. Debuggers, profilers and trace files, however, can do little to detect performance problems in DNA applications. If you watch one particular bully in isolation, he may seem as well behaved as any other kid. It’s often the dynamic of the playground that causes a bully to act out. Unlike traditional profiling tools, Visual Studio Analyzer relies on an instrumented platform. In the most recent Windows releases, Microsoft has added trace information to all the major entry points for DNA applications. Every call to COM, MTS, IIS, ODBC, OLE DB, ADO and script engines provides critical feedback that can be used by Microsoft’s tattletale. It’s a little bit like installing video cameras all over the playground. Rather than changing how the kids play, it provides a much better way to observe their unmodified behavior.
The Visual Studio Analyzer can be used to analyze any application, without having to recompile or instrument the code. Third-party applications are candidates for analysis as well. If Microsoft merely provided a raw log of DNA-related events, it might have been helpful, but it certainly would have been overwhelming. Luckily, Microsoft has outdone itself in turning tons of raw data into useful information. In addition to raw event lists, the Visual Analyzer provides a detailed view, timeline view (showing spikes in resource consumption over time) and a summary view. Filters help control the breadth of events to be monitored. These tools make it easy to determine the problem areas in DNA applications.
The highlight of the various views provided in Visual Studio Analyzer is the process diagram. By treating each system and COM interface as a black box, the tattletale automatically creates a block diagram of the overall interaction of your solution. With the block diagram, you can then replay a captured event log and watch an animated view of your system’s performance characteristics. It quickly becomes obvious who the bullies are on the playground.
In the same way that a video camera cannot display the workings of a bully’s soul, the Visual Studio Analyzer has limits to what it can analyze. The analyzer works at the interface level, and can’t actually drill into source code to find the cause of a delay. This tattletale only points a finger at the problem modules in a DNA application. After that, you’re back to traditional debuggers, code profilers or psychoanalysis to determine the root cause of the behavioral problem.
Visual Studio Analyzer is an example of the type of tools Microsoft should provide. As the only company capable of adding instrumentation to the Windows O/S, they are the only company able to invent this type of tool. As such, I hope Microsoft will choose to provide Visual Studio Analyzer bundled with the operating system, as a separate product, or at least provide a reasonable licensing scheme to other development tool providers. This O/S-level tattletale is too important to remain only within the Visual Studio product line. --Eric Binary Anderson is a development manager at PeopleSoft's PeopleTools division (Pleasanton, Calif.) and has his own consulting business, Binary Solutions. Contact him at email@example.com.