External Executable Plug-ins

An external executable plug-in is simpler to create than a standard plug-in. Typically, developing a plug-in for Isight requires that you have a good knowledge of Java programming to create a special Java wrapper class that acts as the interface between Isight and the algorithm. In addition, if the algorithm is implemented in native code (e.g., Fortran, C, etc.), the algorithm must be compiled as a shared library. All native code implemented as a shared library and loaded into Isight becomes part of the main process and has more stringent requirements regarding its ability to produce fatal errors, memory management, and file management.

To create an external executable plug-in, you must first prepare and compile an external executable program. Isight provides a template file for the approximation and optimization plug-ins to help facilitate the creation of the external executable program. All the tasks of reading and writing the special files used to communicate between Isight and the external executable program are already implemented in the template file. You can save the template file from the Isight SDK Generator and use it as a starting point to make any required minor modifications to the utility functions. After creating the external executable program, you use the Isight SDK Generator to name the plug-in, define technique options, set attributes, include the program in the plug-in JAR file, and publish the plug-in to the Isight library or save it to disk.

In an external executable plug-in, Isight communicates with the external executable program by writing and reading special files. This communication is less efficient than the standard plug-in because of the overhead of creating and reading files. However, the overhead of file creation and reading during execution becomes insignificant when the subflow evaluation time is more than a few seconds.

Each action (e.g., initialization, evaluation, etc.) is done as a separate execution of the external executable program by Isight, using a special command line argument to indicate what action is required at the time. Command line arguments also contain several key-name pairs, each pair defining the name of one of the special files that is either created by Isight or is expected to be created by the external executable program. The order of the key-name pairs in the command line arguments is not guaranteed to be the same at all times. The external executable program must rely on the keys to determine what file name is next in the command line arguments.

For more information, see About Approximation Technique Plug-ins or Overview of Optimization Technique Plug-ins.