Saturday, October 15, 2016

Introduction of the Tiniest Module Container

Introduction

I have worked many years building Java Applications in all sorts of environments, using different tools and standards . As many of the modern platforms, libraries, services and standards available, OSGI is a very useful construct to plug modules (collection of libraries) together to create a homogenous Java application.  I remember a project I participated in that took place about 4 years ago where I had to integrate web server, database, GUI, printing and other kinds of functionality into one single OSGI container. To be honest, it felt often like being inside somebody else's nightmare. I had to combine compounds of libraries that worked well on its own but clashed with another compound if unified within one OSGI container. I succeeded at the end resolving the hundreds of Class loading errors, sometimes having to rebuild libraries according to my own needs. I am optimistically hopeful though that today this is probably not necessary anymore and assembling modules in the latest OSGI containers is a piece of cake.

I do like slim designs, thin layers, software without weight. There is therefore not much inspiration within me to use the often bulky platforms and standards for my own, private work. My experience is that things get in my way and I can not always implement what I need to do quickly and easily. But the idea of OSGI is a good one and reminds me of a construct I created more than 15 years ago

Tiniest module container

The idea of this container is to be a shell that carries the code that makes it an application. It does this with the use of the concept called "persistent state". New functionality modules are installed within it and the maintenance (updates) of these modules happens automatically, almost seamlessly.

Let's look at a tiny overview diagram:


Java is an absolute gem because it gives a software engineer fine tuned extension possibilities like no other implementation language I know. The key to making this concept work is the ability to implement a customized Class loader for the Shell (application).

Got the idea yet? I will develop this further in one of my next post, which will include a Class Diagram and some Process Flow.

The explanation of the Tiniest Module Container continues here: Tiniest Module Container (Module handling)

No comments:

Post a Comment