Skip to main content

Introduction to the Web Gateway

Any InterSystems IRIS® web application relies on three software components that collectively handle HTTP requests and responses for that application:

  • The web server is a software utility that receives incoming HTTP requests and determines how to handle them. InterSystems supports several different web servers, varying by operating system.

  • The InterSystems Web Gateway is a software utility that receives HTTP requests from the web server and then sends them to the appropriate InterSystems IRIS server.

    Depending on the platform, the Web Gateway is a shared library, a .dll file, or a CGI script. You can install the Web Gateway as part of InterSystems IRIS or as a standalone utility, depending on your architecture needs.

    The Web Gateway includes management pages via which you can perform global configuration, configure servers, configure web applications, and monitor the Web Gateway.

  • The CSP server receives HTTP requests from the Web Gateway and then handles them by calling code within InterSystems IRIS. The CSP server is actually a process running within an InterSystems IRIS server. This process is dedicated to serving requests received from the Web Gateway.

Purposes of the Web Server, Web Gateway, and CSP Server

The web server does the following:

  • Accepts incoming HTTP requests, usually from browsers.

  • Checks permissions.

  • Possibly serves static content (see the next item).

  • Sends requests for specific forms of URLs to the Web Gateway. This is determined by the configuration of the web server. In all cases, URLs with the following endings should be processed by the Web Gateway:

    .csp .cls .zen .cxw 

    The first three extensions refer to kinds of code that can run in InterSystems IRIS. The last one (.cxw) is a reserved extension used by the Web Gateway management pages. Within the context of the Web Gateway, these extensions represent the InterSystems file types.

    The web server can be configured to send additional types of files to the Web Gateway.

The Web Gateway does the following:

  • Determines which InterSystems IRIS server to send a request to.

  • Sends requests to the correct InterSystems IRIS server, specifically to the CSP server in that InterSystems IRIS server. (For URLs that end with .cxw, the Web Gateway instead invokes the separate Web Gateway management module.)

  • Maintains connections to the InterSystems IRIS server, to avoid having to continually open new connections.

Within InterSystems IRIS, the CSP server does the following:

  • Receives an HTTP request for an application.

  • Checks the configuration settings for the web application, which are specified in the InterSystems Management Portal and saved in the CPF file for InterSystems IRIS.

  • Executes a callback in the requested code, which sends HTML back to the Web Gateway, which sends it to the web server and back to the browser.

How the Web Server, Web Gateway, and CSP Server Work Together

When a client requests information from a web application, the flow of information is as follows:

  1. An HTTP client, typically a web browser, requests a page from a web server using the standard HTTP (or HTTPS) protocol.

  2. The web server recognizes this as a CSP request and forwards it to the Web Gateway using a fast server API.

  3. The Web Gateway determines the InterSystems IRIS server to talk to and forwards requests to the CSP server on that target system.

  4. The CSP server running in InterSystems IRIS processes the request and returns a page to the Web Gateway, which passes it back to the web server.

  5. The web server sends it to the browser for display.

FeedbackOpens in a new tab