Contents SAS/IntrNet 1.2: Application Dispatcher Previous Next
 

Introduction to the Application Dispatcher

Using the Application Dispatcher, you can send information from a browser to a SAS session for processing and have the results returned to your browser. The results appear in the browser as text, HTML, GIF, JPEG, or any other format that is supported by your browser.

You should use the Application Dispatcher if you

  • want to analyze and display information dynamically on the Web, letting your Web browser users retrieve the information they need immediately.

  • have SAS programming experience but have little or no CGI programming experience. Dispatcher lets you create the Web user interface and retrieve the SAS data for display on the Web without having to write a CGI script.

  • want to create applications that provide Web output without investing a lot of programming time.

  • want to create applications that run on a variety of browsers.

The program that SAS software runs can be a program that you or someone else at your site writes, or it can be a program that is provided by SAS. We provide sample programs and documentation to help you write the programs that meet your information delivery needs. You can even use the sample forms and code as the foundation for your own application. Without too many changes, you can modify almost any SAS batch program to run via the Web, breathing new life into legacy applications and legacy data. In addition, we also offer some commercial applications, written by SAS, that run with the Application Dispatcher. These are included at no extra charge with SAS/IntrNet software.


What is the Application Dispatcher?

The Application Dispatcher exchanges and processes information using the following components:

HTML-Formatted Web page
The input component of a Dispatcher application consists of one or more of the following items:

  • An HTML form with a Submit button. When the Web user provides the required information and submits the request, the browser sends the data that was entered plus data from any hidden fields to the Application Broker.

  • A hypertext link to the Application Broker. When the user selects the link, the browser sends a request, which includes parameters that are specified in the link Universal Resource Location (URL), to the Application Broker.

  • An inline image whose source is a reference to the Application Broker. By simply viewing the page, the user causes the browser to load the image and send a request to the Application Broker. Parameters can be included in the URL similar to the process for a hypertext link.

  • A Java applet, ActiveX control, or Plug-in that contains a reference to the Application Broker. Depending on the object, it may send a request to the Application Broker immediately or wait for a user action such as clicking a button.

The Web browser user, who does not need to know how the Dispatcher passes and processes the information, sees the results of the application appear in the browser. The results can be presented as a downloaded file in more sophisticated applications.

Application Broker
a CGI program that resides on your Web server (for example, in the cgi-bin directory). The Broker interprets the information received from the HTML form and passes it to the Application Server.

Each request contains the name of a service that will fulfill the request. The Dispatcher identifies the service by looking at the Broker's configuration file and determines where and how the request should be forwarded. The configuration file defines the services that are available for Dispatcher Applications to use.

Application Server
a SAS session that receives input from the Broker. The Application Server accepts information from the Broker CGI program.

Dispatcher program
After the Application Server receives input from the Broker, it invokes the Dispatcher program which processes the request and returns the results of the request back to the Broker for delivery to the Web browser and the waiting user.


What are Dispatcher Services?

Typically, the Application Server runs continuously, waiting for new requests. This type of service is called a socket service and refers to the protocol used (TCP/IP sockets) to communicate between the server and the Broker. Using this type of service, many servers can run at the same time, letting the Broker balance the load. As multiple users invoke Dispatcher programs, multiple servers can be utilized to improve application performance. (For details about load balancing, see Using Multiple Servers and Ports (Load Balancing) in Enhancing Performance.)

Rather than using the socket service method of running the Application Server, you can start a new server upon each request. This is referred to as the launch service. Although this method can require more time than the socket service method (due to the Application Server starting up each time), the method is easier to administer and provides some security advantages. Because the launch service provides a fresh SAS session for each request, it is the preferred service for developing Dispatcher applications. Using launch will ensure that unstable applications do not adversely affect a socket service in use by other, more stable applications.


What are Dispatcher Applications?

The Broker and the Application Server provide the communication and processing mechanisms for Dispatcher applications. A Dispatcher application is an HTML form and a program written to accept the information (name/value pairs) that is passed to it from the form. The code for a Dispatcher program can be one of the following:

  • a SAS program (an external file with a .sas extension)
  • a source entry (a catalog entry with a .source extension)
  • an SCL entry (a catalog entry with a .scl extension)
  • a compiled macro (a catalog entry with a .macro extension).

The program that you create must be designed to accept the information that is received from the Web browser. In many cases, this means that you not only create the source program but also the HTML page that passes information to the Broker. For more information about Dispatcher applications, see Creating Dispatcher Applications.

Note that SAS also provides some Dispatcher applications, such as the MDDB Report Viewer application, that are ready to use as soon as you install the Application Dispatcher.


Who Uses the Application Dispatcher?

The Application Dispatcher has several different types of users:

  • the end user, who enters information in a form, selects a link, or views an inline image that displays in a Web browser.
  • the Web page author, who creates the HTML form or page, which includes unique Dispatcher fields. This person may or may not be a SAS application developer.
  • the Dispatcher program developer, who creates the Dispatcher program that receives information entered in the Web page.
  • the system administrator, who maintains programs on the Web server and maintains the Application Server, sometimes referred to as the Webmaster.

This Application Dispatcher documentation addresses the Web page author, the Dispatcher program developer, and to a lesser extent, the Webmaster.


Contents SAS/IntrNet 1.2: Application Dispatcher Previous Next