Dynamic Plug-in Loading with Ada - Paper Available
PARIS, FRANCE - Maintenance of high-availability systems (e.g., servers) requires the ability to modify, enhance, or correct parts of the application without needing to shut down and re-link the entire system. This is relatively straightforward in an interpreted or virtual-machine based language such as Java, in which new code is loaded upon demand. In a language with static executable images this capability can be realized though dynamically loaded / linked libraries ("DLLs"). However, in practice this causes problems, because the protocol for invoking subprograms in a DLL is very low-level and sacrifices type safety.
Object-oriented programming makes this approach practical by using dynamic dispatching to invoke dynamically loaded functions with a more robust, high-level protocol. In an OO paradigm, a îplug-inì contains new classes that enrich the class set of the original application. Calls to subprograms in the shared library (plug-in) are done implicitly through dynamic dispatching which is much simpler, more transparent to the programmer, more type-safe, and thus much safer.A paper by Cyrille Comar and Pat Rogers shows how Ada ñ a statically-typed, statically-built, object-oriented languageñ can fully implement dynamic plug-ins as in Java, but without needing to rely on a comparatively inefficient virtual machine. This paper, which will be available on the AdaCore website, shows how to use GNAT Pro to build an extensible application and illustrates adding new functionality at run time through plug-ins, without needing to shut down the program.