About / Fun aQute - Software Consultancy
Search
*

Fun Projects

This page contains a numner of projects that I am currently involved with. Key issue to continue is time, like always.

Xierpa

Xierpa is an OSGi based web server. Other bundles can link in processor for certain content type. The key processor is an XSLT processor processes XML data from disk. This rather plain, the interesting part is how the XML is used. The XML contains components of text that are combined in pages and then automatically layed out. This is an interesting idea that before has been used in XPyth, which subsequently was used in several health care oriented sites to provide customized patient education.

Petr van Blokland, the original author of XPyth, is doing the majority of the work because I currently have too many other responsibilities. However, we work together on the architecture and I help out with OSGi and Java related issues. Moving from Python to Java is painful!

We are discussing to move Xierpa to Felix. If you are interested to participate, let us know.

Bnd

Bnd is a product you can download from this site. It is a quite powerful bundle tool, that builds, wraps, and verifies. However, there are many more features that can be added:

  • Profile/Execution Environment verification. Today, you can make a bundle only to find out it can't run on your target environment.
  • Stripping of debugging, annotations, and other unnecessary cruft. The information in the Java class files is extensive but often not needed in runtime. It would be nice if Bnd could remove these redundant attributes.
  • More checking. There are many more things that need to be checked to ensure that a bundle can run once it passes bnd. For example, compiler level checking (class version),
  • Add more help and better descriptions of errors
  • Verify a set of bundles for consistency
  • Remove unneeded code in a bundle. Packages that are not exported can only be touched from the inside. It is therefore possible to remove code that can not be reached.
  • Break up a bundle in smaller bundles that minimize coupling. For example, you have a util bundle that consists of several parts that are completely unrelated. In that case it is better to split them up in small bundles because otherwise the transitive dependencies become too big.
  • Provide a better GUI in Eclipse, the current model is rather poor. For example, preferences are missing. More functions are pretty reports, graphic dependency tree, etc.
  • Verify the localization files
  • More macros, maybe include beanshell so that a full blown programming language can be used.
  • etc. etc.

Build System

I am pretty fed up with the ant and maven. Both build systems make the fundamental mistakes that XML is intended for humans. If that was all, then I could probably live with it. However, both systems also make the fundamental mistake to offer high level functions while the primitives are not available. Try to combine two functions in ant and you will see what I mean. All functions that can work together have been designed to work together. The brilliant idea of Linux to have a toolbox of many simple functions that can easily be combined has been lost to the authors of ant and maven.

I have been experimenting with beanshell and the results look promising. I have created a number of base classes (Project, Artifact, Jar, Compiler, Repository, etc). that are extended and parametrized by beanshell scripts. A mke file could look like:

  source("../cnf/make.mke"); // default for all projects
  main = new project("mke");     // create project in local directory
  main.require("bshcore.jar");   // Depends on jar

  mke = new bundle("aQute.mke","3.1.0");
  mke.export("aQute.lib.xml.*");
  mke.privat("aQute.impl.*");
  mke.include( "license.html" );
  mke.include( "readme.txt" );

  main.target(mke);   // Add as target

The advantage is that you are not stuck to XML or another language. Beanshell accepts Java code (including classes definitions) but also accepts a more simplfied form of Java. This makes scripts small and concises but in a familiar syntax. Extending the basic facilities is easy to in Java. Combining functions is also easy because it is just plain Java that is available.

OSGi Shell

Richard S. Hall and I have been working on a shell for the OSGi. The OSGi Alliance has one, Equinox has one, Felix has one, and Knopflerfish has one. All these shells are easy to extend but all do it in their own way. So Richard and I decided to join forces.

I have developed a core shell that uses javacc for the parser. The shell supports piping and many other features.

Measuring the Speed of Light

And now for something completely different ... I have combined forces with a number of friends here in the south of France. We are building a device that will measure the speed of light without using electronic gadgets (well almost). The current design uses a laser, an old laserdisc, a rotating tool at 30.000 rpm, and a telescope. We use Foucault's method. The laser shines through a hole in the laserdisc. The disk rotates at 30.000 rpm so when the light returns from a long distance (we are thinking of 30km now), the disc has moved about 10 cms. By using the telescope to peek through the hole at an adjusted position we can measure the rotation between the time it took the light to traverse the distance.

Obviously, this is a silly project but it is sometimes good to do something that does not require computers.

Copyright 2006 aQute SARL, All Rights Reserved