Friday 20 January 2012

APIs at Project Level or Application Server Level?

As all of us know, any libraries, apis could be included at application server level or at project level (within war file).

Like any other libraries, Metro web services could be included at project level or application server level. Main difference here with other libraries is, usually installing at project level is the default choice, and server level installation is rare, but Metro suggests this in its documentation and it comes with GlassFish as pre-installed package. Metro also provides an installer to install Metro to Tomcat, so here including at server level becomes default choice.

We can always avoid Metro at application server level, and include it at Project level.  Here it triggers some thoughts on best approach, not just for Metro but for any Libraries, in my view,

Including at project level is better, because

  • Libraries should be specific to projects, not common to all the projects deployed in the application server
  • Upgrading all the projects in an Application server to new version of the library is not practical
  • Keeping projects independent of application server specific libraries is always increases manageability and avoids release issues.
  • Usually upgrading and installing the libraries at server level will be the task of Server admins, In my view handling libraries should be the task of developers not admins.
  • Including at project level bundles the library with the project, so at the stage of delivery the project has been tested along with the library, so it reduces the delivery time bugs.
  • It keeps the application server as unchanged from its installation and avoids configuration issues
  • Clean application server, so no conflict with the libraries from the project.
In my recent experience, we faced a library conflict issue because of using metro at server level, now we changed to project level and looks our project and application server is independent of each other and works fine. Share your views too. Thanks.

0 comments:

Post a Comment