Alex headshot

AlBlue’s Blog

Macs, Modularity and More

Smartfrog: running distributed systems

2006, test

Steve Loughran and Julio Guijarro have just given a presentation on Smartfrog, which is a research project out of HP Labs. It's hosted at Sourceforge, so you can download and play around with it; there's tutorials on the website. (Steve has more presentations at apache if you're interested.) The overview lists it as:

SmartFrog is a technology for describing distributed software systems as collections of cooperating components, and then activating and managing them. It was developed at HP Labs in Bristol, in the UK. The core SmartFrog framework is released under LGPL.

Essentially, Smartfrog treats system configuration and deployment as something that can be automatically executed and tested. There's a configuration language that can be used to describe requirements for a system (what are the database requirements, what application server will be used to host the running tests etc.) and an automated deployment model that allows your application to be uploaded and run on a (possibly remote) host.

What's great is that it also handles the collection of test results from those machines as the tests run (unlike, say, JUnitReport which is only run when all tests are finished). At the moment, test results are written to an XHTML file so that it's both human readable, but encoded with DIV tags so that it's processable by applications, though they note that what is really needed is a standard XML format for representing test results, including setup/configuration/property information. (I observed that such a format should almost certainly be built on Atom, since that's something that's also consumable by a number of libraries.)

There are adapters that allow a number of different test frameworks to be executed (such as JUnit3/4, TestNG) and collate the results from them when they come back. So you don't need to have any specific testing framework (providing it's supported, of course) and then take advantage of the test running in different locations. Of course, this allows you to test real world conditions such as the firewalls that may be in the way, or issues with a real database at the back end, or even that the system works on all different operating systems.

One of the other links that came up in the talk was Selenium, which is a web-based testing system for browsers. So when you want to test whether Firefox works in the same way as Safari (or even Internet Explorer). It looks like it uses JavaScript to perform navigation and therefore uses exactly the same kind of interpreting that the browser supports. Pretty neat, and one to look in more detail. The video is now available.