Friday, November 5, 2010

Pluggable analysis

Added the basic functionality for pluggable graph analysis algorithms. The algorithms are packaged as jars with entry points that implement an Algorithm interface. The jars can be selected via the "Load Algorithm" item in the "Analyze" menu. When the algorithm is successfully loaded it is added to the "Algorithms" sub menu of the "Analyze" menu, from where it can be invoked. The code certainly needs to be expanded upon and cleaned up/refactored, and additional functionality must be added.

1 comment:

  1. Java had a "SPI" convention for doing plug-ins (I forget the name of the acronym). Probably worth a look, just so you can say that you are familiar with existing conventions. Based on what I know of it though, it may not be ideal. Specifically, SPI involves having the plug-in jars already sitting in the classpath at the time the program starts. Your ad-hoc approach may not be so bad. Of course, the usual semi-snarky answer is "enable both" :)

    ReplyDelete