Websydian v6.1 online documentationOnline documentation - Websydian v6.5

Websydian Web Server Interfaces

Introduction

This document describes the different ways a Websydian application can communicate with a web server, why the Distributed Websydian Architecture (DWA) was developed, and the advantages it gives compared to Classic Websydian Architecture (CWA).

DWA is the primary Websydian architecture from Websydian 4.0. CWA will still be developed and supported, but new features will be developed primarily for DWA. Please see the sections below on DWA and CWA for further details.

What is a Web Server Interface?

A web server interface is a protocol specifying how the web server should interact with clients requesting resources.

A good example of a resource request is a user can request a resource from a web server using a browser. In this context a resource is typically an HTML document, an image, a PDF file, or some other file the user wants to view in the browser or download to the local computer. A resource can also be a program executed by the web server, and the program is then responsible for returning a suitable response to the browser (in most cases an HTML document). When a program is executed by the web server the web server will launch the program and transfer all information about the request to the program.

The program launched by the web server will typically be part of an application performing specific tasks and therefore such a program is also known as a web application. The user will then start and use the application through the browser, performing a sequence of requests to the web server. It is then up to the web application to detect which user each request comes from and save information about the session state between each request.

For this to work there must be a protocol specifying how the web server should transfer control and the necessary information about the request to the web application. For the remainder of this document such a protocol is called a web server interface. Today there are several web server interfaces on the market (CGI, ISAPI, NSAPI, Servlets,..) each with their own set of advantages and disadvantages.

Websydian Web Server interfaces

As all other web applications Websydian must also choose a way to communicate with the web server. This is built into the Websydian patterns and the developer can develop the Websydian application without having to think about how the application communicates with the web server. Websydian is said to be transparent to the web server platform and interface.

Classic Websydian Architecture (CWA)

From Websydian 4.0 and forth, CWA changes status from being the primary Websydian architecture, and DWA takes over. CWA will still be supported, but not all new features in future versions of Websydian will be supported in CWA.

The initial web server interface supported in Websydian was CGI on the Windows platform and the iSeries platform. The reason for this is that CGI was and still is supported on all web servers and that it despite its somewhat bleak reputation works quite well and is reliable.

The Websydian CGI interface (supported in Windows and iSeries) is now known as the Classic Websydian Architecture (CWA).

There are some issues regarding the CGI interface in general where the two most important are:

In order to overcome these issues the Distributed Websydian Architecture was developed.

Distributed Websydian Architecture (DWA)

DWA is the primary Websydian architecture from Websydian 4.0 and forth.

The Distributed Websydian Architecture (DWA) separates the web server from the web application by placing a Websydian Web Server Component on the web server. The Websydian Web Server Component is a small component on the web server that dispatches requests to the associated web application (called the Application Service). For more information about DWA please refer to the Distributed Websydian Architecture Overview.

DWA has the following advantages:

Pros and Cons

This section list the pros and cons for each web server interface in Websydian.

CWA

Pros Cons
Simple setup and deployment As each request is handled by a separate (CGI) process this puts a heavier load on the web server when handling many requests
CGI interface supported natively by all web servers Does not scale very well
Proven technology Relatively long response times
Failures when handling one request does not influence other requests as each request results in a separate process being created Load balancing not possible in Websydian

DWA

Pros Cons
Small load per user (compared to CGI) More complex setup and deployment
Can easily be deployed in existing security environments (firewalls, dmz,...)
Small delay (response time)
More flexible regarding the choice of web server
Application distributed over multiple machines
Support for load balancing
Small load per user (compared to CGI)

Links

http://www.w3.org/Protocols/rfc2616/rfc2616.html
The RFC specification for HTTP 1.1.