Skip Nav U.S. Army Research Laboratory DoD Supercomputing Resource Center
Sitemap Contact Us Quick Links

Coding

What's All This Distributed Computing Stuff, Anyhow?

By Jerry A. Clarke

Regular readers of this section will remember that in the last issue, we were building an Augmented Virtuality system.

Most of you will also remember that this consisted of a "Reality Sandwich," where real objects were placed between a conventional rear-projected screen and a transparent screen.

Augmented Virtuality System with Data Sonification
Donning 3D glasses, Clarke uses the Augmented Virtuality System with Data Sonification.

Additionally, an important part of the system was the 6.1 sound system (six speakers and one powered subwoofer), which we used to map scalar variables in a dataset to frequencies of sound; a technique called sonification.

Recently, while working with a structural mechanics dataset on my SGI system, I had the usual cutting planes and isosurfaces splashed across my screen, as my toes tapped to the "Smooth Jazz" music emanating from the streaming player on my office PC.

Too bad I can't use the same sonification techniques at my desktop that we use in the Augmented Virtuality system, I thought to myself. It's a shame I don't have a sound ... oh wait, I really like this song ... sure sounds good with the bass turned up!

Since I'd rather write code than actually find and unpack the speakers that came with my SGI, the possibility of using the sound capability of the PC with the visualization on my Fuel dawned on me. Also, using my PC would give me 6.1 immersive sound as opposed to the default stereo from the SGI. As luck would have it, most of the software in the Augmented Virtuality system is based on the Python scripting language, which runs on most flavors of UNIX as well as Microsoft Windows. Sonification was accomplished by developing an interface layer of software between Python and OpenAL, an open source cross-platform 3D audio Application Programmers Interface. Visualization applications, written in Python, call the Visualization Toolkit (vtk) to accomplish the graphics and call the OpenAL interface layer to position and modify the 3D sound.

So the idea is to run a Sound Server on the PC and have the SGI visualization script client request periodic updates of sound frequency and position. Python has built-in support for building client-server applications via a facility called XML-RPC. XML-RPC sends messages, formatted in the eXtensible Markup Language (XML), across network sockets to perform Remote Procedure Calls (RPC). For example, the client side calls the method to change the frequency of the sound. The request is formatted in XML and sent to the server. The XML is unpackaged and the requested method is called on the server side. The appropriate OpenAL routine is called, the sound frequency changes, and an acknowledgement is sent back to the client.

The implementation was extremely easy for me, particularly since our resident Python expert, Mr. Kelly Kirk, did the actual implementation. Kelly is also the person who first introduced us to XML-RPC after looking at the original Augmented Virtuality software. His development platform of choice is a Linux box, but the implementation worked on the SGI without modification.

We measured the XML-RPC overhead between the SGI and my the at about 10msec, which means we can update the sound position and frequency many times a second, even with the added overhead of vtk and OpenAL. Now, even our large SGI Onyx machines can access a Sound Server running on a PC. The output of the PC sound card is then amplified by an A/V controller and routed to a high-end sound system.

Naturally, with latencies in the millisecond time range, this technique is not appropriate for intense parallel computing, but for large grain, service-oriented functionality, it's definitely appropriate.

Now, via the magic of distributed computing, our HPC assets can take advantage of other functionality like speech recognition, game pads, IR Joysticks, etc. We've started the development of a cross-platform framework for managing these distributed assets. The system is called XFrameWork (for some reason, most things that use XML start with an "X," even though the word extensible doesn't). It's a Python-based system that uses XML files for configuration and XML-RPC for communication. With it, we hope to have a system that will allow us to drive the Augmented Virtuality system, along with our RAVE II system and our curved-screen Collaboratorium in Adelphi, Md., without modifying any code, only XML configuration files. An application written in this framework would "discover" the resources that are available, then modify its behavior appropriately.

With the price of a high-quality sound card on the PC around $200, it's hard to justify not using this and other commodity-based resources when appropriate. Sticking with the mentality of using the appropriate tool for the job, I think the lesson here is clear: Listening to Smooth Jazz leads to new ideas.