AH and Deployment Server Design
Often, designing ad-hoc deployment solutions is a matter of client-server design. Many good
topics are available on such a broad topic, and we probably wouldn't add anything new to the
field by discussing it here. Anyway, providing deployment services is a rather specialized,
peculiar activity that deserves some observations.
• Designing a deployment solution gives great freedom of choice to developers, but (espe-
cially for this reason) can result in huge, unpractical deployment solutions. In fact,
deployment services are often run behind the scenes in a transparent fashion. If they are
not designed privileging this aspect, they can become bulky, complex systems when
loaded with real applications.
•In real-world cases, Application Helpers are rarely employed—for several reasons. First
of all, they are expensive to build and complex to manage remotely from a centralized
server. Unfortunately, some design shortcomings become apparent only after the AHs are
shipped to all remote clients, resembling the design shortcomings of the early pioneering
satellites that couldn't be fixed after they were launched into orbit (thus generating huge
economic losses). Although software is not so expensive to build, and thorough testing
will solve most problems, the real-world test is always a risk for complex deployment
scenarios. Furthermore, ad-hoc Application Helpers don't fit well in particular special-
ized situations, in which simpler solutions that take advantage of the given scenario
peculiarities could be employed more effectively.
• Performance is always an issue when developing Java code, and even more when it
comes to such “infrastructure” services such as deployment ones. This aspect favors
developing fast, lightweight ad-hoc solutions in contrast with complete, heavy, and gen-
eral ones. Of course, development costs should be taken into account, as we saw in
Chapter 4 and mentioned briefly previously.
Having said that, we begin the most interesting part of the chapter with some examples that
shed some light on different scenarios in which custom deployment is often needed.
In this section, we will see some real cases of Java implementations of ad-hoc deployment
solutions. The code is illustrative, and may need to be polished or adapted in order to be used
in your particular case. These examples assume that standard deployment solutions (installer
utilities, JNLP, third-party solutions, simple applets) cannot be used or must be customized in
order to achieve the particular need. This assumption justifies the choice of an ad-hoc, possibly
expensive, deployment solution creation.