WebObjects Deployment

This chapter introduces the essential concepts and tools you use when you deploy WebObjects applications.

The chapter contains the following sections:

The WebObjects Deployment Model

A WebObjects deployment has six major parts:

When an application user sends a request through a web browser to your web server, the server forwards the request to the HTTP adaptor. The adaptor then determines which application instance should process the request and forwards the request to it. When the application instance receives the request, it performs the necessary processing to produce a response (a new webpage). The instance then sends the response page to the adaptor, which forwards it to the web server. The web server then forwards the response page to the user’s web browser. This process is illustrated in Figure 1-1.

Figure 1-1  WebObjects deployment model
WebObjects deployment model

Notice that both the application instance and the web server contribute to the response page’s content. The instance uses templates and logic to generate the HTML code for dynamic pages, while the web server provides the content of images contained in those pages. The server can also dispense static pages.

The number of instances of your application necessary to support its users depends on the number of users that connect to your application concurrently. In some cases a single instance is adequate. When one instance is not able to process requests in a timely manner, additional instances can solve the problem. This way, the amount of user-state information that a single instance stores is reduced. In addition, with less state to keep track of, an instance can process requests faster. Figure 1-2 shows a site with one host running multiple instances of an application.

Figure 1-2  WebObjects deployment model—multiple instances of an application
WebObjects deployment model—multiple instances of an application

However, adding instances of your application to a host may not be the most effective solution. Eventually, a point of diminishing returns will be reached, where adding instances actually decreases your application’s performance. In such a case, you should consider adding additional application hosts that run the extra instances required to handle the increased traffic to your site. Figure 1-3 shows how a site with two computers, one acting as an web server and application host, and the other just as an application host would look.

Figure 1-3  Deployment using two computers
Deployment using two computers

The WebObjects Deployment Environment

Before deploying applications, you need to master two important aspects of WebObjects Deployment: the communication paths of client requests and server activity, and the deployment tools you use to configure your site.

Communication Paths

Communication among the elements that make up a deployment occurs in two paths: the data path and the control path.

A client HTTP request takes the data path after it reaches your web server. Figure 1-4 shows how an HTTP request that your web server receives is passed to the elements that generate the response.

Figure 1-4   The data path of a WebObjects deployment
The data path of a WebObjects deployment

JavaMonitor requests take the control path to propagate configuration changes to application hosts and, ultimately, application instances. These include adding application instances and starting and stopping instances according to a schedule that you define. The HTTP adaptor can obtain site information by polling wotaskd (WebObjects task daemon) processes or by reading the adaptor configuration file. (See Deployment Tools for information about JavaMonitor and wotaskd.) Figure 1-5 shows the control path.

Figure 1-5   The control path of a WebObjects deployment
The control path of a WebObjects deployment

Figure 1-6 shows how the data path and control path are differentiated in the rest of the document.

Figure 1-6  The symbols used to represent the data path and the control path
The symbols used to represent the data path and the control path

Deployment Tools

The main tools you use to manage your site are wotaskd and JavaMonitor. Normally, one wotaskd process runs on each application host. If you want to concurrently deploy multiple sites on the same hardware, you can configure a computer to run more than one wotaskd process. This essentially provides you with several independent application hosts per computer.

You manage a group of application hosts using JavaMonitor, a tool that uses your web browser as its user interface. JavaMonitor lets you set, among other things, instance scheduling and the load-balancing scheme to be used for each application. Because each JavaMonitor process maintains state information locally, you must run only one instance of JavaMonitor per site. Figure 1-7 shows two application sites on one computer.

Figure 1-7  Two sites deployed on one computer
Two sites deployed on one computer

Figure 1-8 shows how you can distribute application instances among two computers.

Figure 1-8  Two sites deployed on two computers
Two sites deployed on two computers

After you configure your site using JavaMonitor, it enforces that configuration by performing tasks such as stopping and restarting application instances according to a schedule you set and sending email notifications when problems arise. The HTTP adaptor performs load balancing across the instances of each application on your site.

For detailed information on the subjects introduced above, see the following chapters or sections:

  • HTTP Adaptors shows you the different ways in which you can configure the WebObjects HTTP adaptor.

  • Deployment Tasks describes how you use JavaMonitor to configure your site.

  • Setting Up Hosts describes how you use JavaMonitor to add application hosts to your site.

  • Configuration Files shows you how the configuration you define in JavaMonitor is distributed among the application hosts of your site.

  • wotaskd Processes explains how wotaskd processes communicate with and manage application instances.

  • Lifebeats explains how application instances communicate with a wotaskd process.

  • Deploying Multiple Sites explains how to configure your platform to deploy multiple sites concurrently.

  • Load Balancing describes how load balancing works and lists the algorithms that the HTTP adaptor can use to implement it.

Keeping Your Site Secure

In a WebObjects deployment, you have several features at your disposal to enhance the security of your site: