GOAT (Graphical OSGi Analysis Tools) is one of the Apache Aries samples. It's not released code but can be found in SVN and is easily built. Check building Aries to see how.
When you have built the project, navigate to the samples/goat/goat-assembly/target directory and run the sample by typing:
java -jar osgi-3.5.0.v20090520.jar -console
Have a look at the bundles (using 'ss'), you should see several 'goat' bundles active. Now, so that you can look at it later, install the Aries JDBC blog sample into the same framework. You should be able to do this just by copying the samples/blog/blog-jdbc-eba/target/*.eba into the goat-assembly/target/load directory.
Check that the blog sample is running by navigating to http://localhost:8080/org.apache.aries.samples.blog.web/, you should see this:
Click on 'Create Author' and create an author.
Now, in a different browser window, navigate to http://127.0.0.1:8080/org.apache.aries.samples.goat.web/web/. You should see this:
Not very exciting. Click on the drop-down beside 'DummyProvider' and select 'BundleContextModel', then click 'Use Provider'. Wait a few seconds while the screen builds itself, it should look like this:
On the left hand side you'll the same list of bundles as you saw with 'ss' from the command line, in the right hand area you can see each bundle drawn as an oblong shape. Since we are displaying all the bundles in the platform this is probably a bit too much information. Hit the 'Hide all' button at the top to get rid of them.
Use the slider to move down the list of bundles on the left until you get to the blog sample bundles. Click on 'show' for each blog sample bundle, grab the bundles and move them around to get to this:
Now you can see the four bundles that comprise the Blog sample and you can see a bit of information about how they are related to each other. Try clicking on the 'twisties' to expand information about packages and services.
This is really prototype code, we wrote it to get round the problem of using a mixture of the OSGi console and slides to explain how the blog sample works. GOAT works by having an OSGi bundle in the framework which spits out information to a web front end which we deal with in JavaScript - that's what allows you to move bundles around. Even though it's at the prototype stage at the moment I think it's worth mentioning in a post. I haven't found anything similar, Knopflerfish do have a graphical display but it's static - you can't grab things and move them around.
Wednesday, 22 September 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment