InfoQ

News

Struts 2 Experiments with Hot Deployable Plugins

Posted by Andy Roberts on Aug 08, 2007

Community
Java
Topics
Web Frameworks
Tags
Struts ,
OSGi

Apache Struts, the ubiquitous Java web application framework, received a promising feature that permits hot-deployable plugins. Struts developer, Don Brown, revealed last week that work had begun on allowing plugins to be added, removed and upgraded instantly, without the need to restart the entire application.

Brown mentioned how he was impressed by the plugin systems used by Atlassian's JIRA and Confluence products (Atlassian happens to be Brown's employer) which supports hot-deployable plugins. He wanted to bring something similar to Struts, which would clearly benefit from having such a feature. Thus work began on the OSGi plugin.

On top of the advantages of being able to maintain application uptime, and thus eliminate interruptions to users, there are pluses for the application development side also. Don notes:

This capability is so powerful that internally we are moving more and more functionality into plugins as a way to organise our codebase and keep it tightly-focused and agile.

The new Struts plugin allows the developer to split up applications into discrete jars, or "bundles", which when placed in the appropriate location on the server will be picked up by the OSGi plugin and deployed. Minimal effort is required to get the plugin up and running, and one of Brown's goals is to keep bundle development simple by hiding many of the OSGi complexities from the developer (of course, he's preparing for a small backlash as he admits "OSGi experts would lament" at his decision).

Currently, the OSGi Plugin is in its early stages and has not had sufficient levels of testing to be classed as ready for production. There are several limitations in the current release, namely lack of a GUI administration utility; only Velocity templates are supported; plus certain restrictions on what is permissible within a bundle (no 3rd party jars). The source is publically available via the Apache Struts 2 sandbox, and in true Apache style, community participation is welcome. As of yet, there's no hint that the plugin innovations in Struts 2 will be back-ported to Struts 1.

They read my mind by Simon Pink Posted Aug 8, 2007 4:26 PM
Re: They read my mind by Don Brown Posted Aug 8, 2007 5:38 PM
OSGi will become hotter than it already is. by Richard L. Burton III Posted Aug 10, 2007 12:20 PM
  1. Back to top

    They read my mind

    Aug 8, 2007 4:26 PM by Simon Pink

    This is exactly what we need for our applications. We make numerous wesbites, each containing the same modules plus a few custom modules. OSGi is the perfect glue for true modularity. Exciting stuff, I am looking forward to seeing where this leads...

  2. Back to top

    Re: They read my mind

    Aug 8, 2007 5:38 PM by Don Brown

    I've found this capability is especially valuable in hosted, or software-as-a-service models, where uptime is paramount. Having the ability to install a new admin tool, report, or nightly job without affecting the site is very useful. Large applications tend to build their own plugin module, so why not make that a standard service in the web framework that even small apps can use?

  3. Back to top

    OSGi will become hotter than it already is.

    Aug 10, 2007 12:20 PM by Richard L. Burton III

    You're going to see a strong movement in OSGi support for web based applications and SOA. OSGi provides more than just hot deployment, but the ability to deployment multiple versions of a service at one time. This allows for developers to migrate applications over to a newer version when the time and budget allows for it without having to write a bunch of hackish code to do this. Then again, you should also consider an ESB at that point :)

    Best Regards,
    Richard L. Burton III

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.