![]() ![]() ![]() |
![]() Deploying and Managing Java Applications A technical overview of the Inprise Deployment Server for Java
By Greg Cole
![]() ![]() ![]() ![]() ![]() Application Deployment in the Enterprise Corporations have adopted Java for two primary reasons: the language and the platform. Java the language provides an elegant, object-oriented language for rapid application development. Java the platforms holds the promise of "Write Once, Run Anywhere"(tm)-creating an application once and being able to run it on the myriad of systems in corporate use today. Originally, this platform independence was thought of primarily in terms of Applets running in the confines of a Browser. However, for productive business applications, Applets are generally not the answer-no hard disk access, security restrictions, and browser incompatibilities are some of the issues driving corporations to full-fledged Java applications. But with applications, the Applets ease of cross-platform deployment is lost. To simplify and reduce the cost of application deployment and maintenance, Inprise delivers the Deployment Server for Java, which provides the convenience of applet deployment to full-featured Java applications. Applications are installed once on a server, then are seamlessly accessed by remote clients on any platform. Updates are centrally administered and immediate. Access is secure and may be monitored. Benefits for the developer include: Benefits for the developers' customers include:
Understanding the DSJ Architecture The DSJ Server provides the centralized storage and management of applications, and includes visual administration tools. These tools allow administrators to rapidly register, change, and update applications, define application access lists, group servers, and associate specific Java runtime environments (JREs) with applications. Once this information is defined on the server, applications can be easily run from any system in the organization using the DSJ Client. The DSJ Client provides the communications layer on client machines, communicating with DSJ Servers to rapidly provide the most up-to-date applications to the end user. The client can be configured to either start up individual applications, or to retrieve the list of available applications on the server. In either case, the end user perception is of starting a local application-they do not need to know anything about the server. At a high level, the Client seamlessly determines if the current version of the application is cached on the local machine-if it is, the application is started up using the local copy. If the latest resources are not available on the local machine, they will be retrieved from the server, and the application is started. The entire process is completed automatically, without any intervention from the user. The rest of this paper drills down into the specific technologies employed by the Deployment Server for simplifying the deployment and maintenance of Java applications. The DSJ Server is designed to store the code, resources, and Java Runtime Environments (JREs) that make up a Java application(s). All storage on the server is versioned, allowing multiple versions of the same application to be efficiently maintained in a form available for client access. One of the primary design goals of DSJ is to ensure that no restrictions are imposed on the Java applications that can be written or deployed.
The Deployment Process There are additional elements that may be specified in order to more completely describe the application to potential users. For most applications, providing values for these fields is all that is required to install the application to the DSJ Server.
Extra Files At runtime, the DSJ Client will ensure that these files are present before initializing the target application.
JRE Dependencies Still other applications may have a preference for the version of the JRE on which they will run. In the case where multiple JREs exist on the client and a preference for one is specified by the application's install, DSJ will ensure that the preferred JRE is in use but will not enforce this nor attempt to automatically configure the client. This is the purpose of the Application Dialog's "Preferred" JRE radio button. DSJ allows the server administrator to specify two preferences, a primary and an alternate.
Failover In order to specify the collection of alternate servers, the system administrator may enter individual servers and their ports, the names of server groups, or both. Server groups are composed of named servers and/or other server groups. This allows the system administrator to construct named server hierarchies and assign or administer them collectively.
Access Control In the simplest of DSJ applications, no accessors are specified. This results in an unrestricted application available to any client that accesses the server. As soon as the system administrator provides an accessor, the application becomes a restricted application. DSJ allows the system administrator to specify several types of application accessors. Access may be restricted by (authenticated) username, by IP address, by IP address range, or by accessor group. An Accessor group functions the same as a server group-i.e., named access to hierarchically nested groups. Accessor groups provide additional capability in that they allow accessors to be combined such that access can be limited to a named user from a particular IP address (or range).
Runtime Control Another DSJ application option is available to determine a particular application's state. The 'enabled' option allows an individual application to be taken off-line or restored in a convenient fashion. Further, the DSJ server allows the system administrator a measure of control over connection management. The system administrator may limit the number of simultaneous client connections that the server will allow. A related option allows the number of connections to an individual application to be constrained. If desired, the server may be configured to drop idle connections after a specified period of client inactivity. Using DSJ client's fault-tolerant architecture, the client will be seamlessly reconnected as (or if) necessary. These options provide the system administrator a very fine grain level of control over the DSJ server's connection pool. A system administrator interested in tuning the performance of a number of applications stored in a group of DSJ servers for access by a large number of DSJ clients can use a combination of connection limiting, idle dropping, and extenders (described next) to fine-tune the system.
Platform Extenders One use of extenders would be to customize the application's name, description, and version for presentation to the end user. This would ensure that they show up in French for clients based in France while showing up in German for those clients from Germany. Another use of extenders would be for when your application relies on native code. When an MS Windows-based client contacts the server, you want to move the relevant .DLL file to the client; if the client is running under Solaris, you'll want to move the appropriate .SO file instead. One alternative would be to deliver both files to all clients, but it is more efficient to send only what is necessary. What the system administrator could do is to specify neither library in the base application and instead to define platform extensions for both Windows and Solaris. Extenders could be used to customize the collection of alternate servers. This would allow the collection of alternate servers to be based on (implied) geographical locations. Extenders can also be used to provide an additional means for controlling access.
Storing Java Runtime Environments Installation of a JRE to a DSJ server requires that the system administrator provide a description of a JRE, the JRE itself, and the JRE's destination directory on the client. The JRE's description is made up of the following information: operating system platform, Java name, Java version, Java vendor, specification name, specification version, and specification vendor. Its destination is simply the name of a directory on the client (either relative or absolute). Specifying the JRE's contents can be done in one of two ways. If the JRE is installed to the server itself, DSJ can create a compressed representation of it, which it stores in standard Java archive ('jar') format to a file called jre.zip. Alternatively, this jar may be created (or copied from another DSJ server) by the system administrator in some other way. Once the DSJ Server has the JRE's description and contents, the JRE may be delivered on demand and installed in a fashion that is transparent to a client that requires it. The DSJ Client software is installed on each client machine. The client software can be updated remotely by the DSJ server whenever future versions become available, so the installation and configuration only has to be done once. The client is configured to look for a primary DSJ server. The connection is made with a custom long-term TCP/IP connection protocol. When the connection is made, the DSJ client can request a list of applications that are available, or request a specific application up front. The DSJ Client employs a custom Java class loader. To run an application, it looks for its classes "over the wire" from the DSJ server, instead of relying on classes being physically installed on the client machine. Because the connection protocol is specifically designed to send classes, it is faster than an applet, and you get full-fledged Java applications, not restricted applets. By default, the DSJ client also caches the classes on the client machine, so the next time the application is run, it comes up immediately; unless there is an updated version of the application; in which case it will automatically download and use the new version. All this is transparent to the user. The DSJ Client progresses through three stages during execution of a target application. In the startup stage where options are processed, the target application is determined and a list of servers for that application is acquired. During the second stage, client and server exchange information about versions, platforms, and dependencies resulting in the establishment of a long-term connection. Finally, after the long-term connection is active, classes are pulled to the client on an 'as-needed' basis and (optionally) cached locally for use the next time the application is run.
Startup Assuming that the specified DSJ server is accessible, the DSJ Client establishes a short term TCP/IP connection with it. You can specify an application to run, either on the command line, or in a properties file. For a given application, you can specify the version to run. If you don't designate a specific version, the latest version of the named application is executed. If you don't specify an application, DSJ client will display a list of applications that are available to you. This list is dynamically created based on the access criteria for each application. Access criteria are determined by the connected DSJ Server based on your authenticated user name, the IP address of the DSJ client machine, or a combination of both. Once a specific application is chosen, the primary DSJ server you have been talking to transmits a list of all DSJ servers it knows that serve that application; this list often includes itself. This is the "available servers" list.
Initial Handshake Once contact with the server is established, the client transmits the version of the JRE that it is currently running, and the versions of other JREs installed on the client machine. Some applications will require a particular JRE; if that JRE version is on neither the client nor the server, the server will refuse the connection request. If the desired version of the JRE is already installed on the client, then the server will instruct the client to restart with that version. If the client does not have the desired version, but that version is installed on the server for downloading, the client will download the JRE from the server, and restart using that version of the JRE. If, after checking all entries in the available servers list, an appropriate server cannot be located, an error dialog box is displayed and the attempt to run that application is terminated. If the client finds a server that provides the desired application, the DSJ client transmits its version number to the server. If they don't match, the server instructs the client to download the matching version of the client software from the server, and to restart itself with the corrected version.
Long-term Connection
Class Download If the client loses its connection to the server while the application is running, it attempts to contact the alternate servers that are supposed to provide the application. This happens transparently, although the user may experience a minor delay as the client attempts to contact the other servers. If the client fails to complete the handshake with another server, an error occurs.
Caching Each application is cached separately. If two applications use the same class file, you will cache two copies of that class, one in each application's cache file. Future versions of DSJ will make it even easier for system administrators to incorporate DSJ into their infrastructures. Remote administration and the notion of self-synchronizing server pools will make the management of large, geographically distributed infrastructures more convenient. For the developer, the individual components that make up DSJ will become available separately, thereby allowing portions of the DSJ technology to be embedded within specific applications. The purpose of software development is to provide a timely solution to an end user's need. Because DSJ is written in 100% Java, it is portable to any machine for which a Java-compliant virtual machine exists and thereby takes advantage of Sun Microsystems's "write once, run anywhere" strategy. Because DSJ imposes absolutely no restrictions on the Java applications that can be deployed, existing applications may be incorporated into a centrally administered system while paving the way for seamless client updates. As software developers, it is our mission to provide our customers with a competitive edge that allows them to outperform their adversaries. By providing a means to simplify, streamline and automate the delivery of the most current, the most powerful, the best software available directly to the end user's desktop, DSJ makes the customer more productive.
|