Running application instead of application servers
Most of the time, Java web application are deployed on their own instance of an application server. Within shops that uses server virtualization, this approach is extended to have one virtual server per application. This is done to ensure that an application will not adversely affect another one running on the same physical server.
However, application server products always assume that you may deploy many application on the same server. Configuring the application server is then a lot more complicated than what would be required to configure just one application.
If most of the time we deploy only one application per application server, why do we not bundle application server in our application instead of installing application server and then configuring our application on top of them?
Here how I would see how it would work :
- Develop the application as usual (deploying the application on an application server),
- Use some tool provided by the application server product to create an installation/update package :
- The tool would have a Wizard like interface (but you would also be able to run from the command-line after saving the settings from the Wizard),
- It would ask for which application to deploy,
- Based on the application deployment descriptor, it would preselect application server features that needs to be available,
- Provide an interface to select additional application server features to activate,
- Ask for default configuration parameters for the application (datasource, ...),
- Generate an interface (web, fat, console) to configure that application when installing/updating it,
- Generate the necessary installation script,
- Package the whole thing into a platform specific package (DEB or RPM for Linux, MSI for Windows, ...),
- Install/update the application on the targeted environment using the generated package.
Using this approach has the following benefits :
- Smaller installation footprint. If the application server does not need to be installed with all it's feature activated, then they should not be installed,
- Easier installation/update process for those who have to maintain the system,
- Easier configuration has only configuration options required for the application will be exposed.
Food for thoughts...