next up previous
Next: Client Session Management Up: The I*Tea Application Server: Previous: Introduction

Software Architecture

In this paper we will describe the I*Tea version which interfaces with browsers through CGI technology.2

An operating I*Tea application site usually involves the following software:

I*Tea is entirely written in Java , inheriting all the advantages of such a technological choice. Its runtime environment occupies a surprisingly low disk space (approx. 1MB, including the Tea runtime environment).

The I*Tea Server is a multi-threaded Java process which can be modelled as a set of software components (data and threads) which communicate between them:

The I*Tea Server is dynamically linked with the Tea interpreter code (also written entirely in Java ) and with other Java class libraries which give it access to whatever the application programmer might need (JDBC for relational database access, TCP/IP APIs, etc...)

A typical interaction with a Web Client goes like described in figure  1.


  
Figure 1: HTTP request interaction
\includegraphics{iteareq.eps}

1.
The Web Client issues an HTTP request to the Web Server (by following a link or submitting a form).

2.
The Web Server receives the HTTP request, and, if the URL requested corresponds to a cgi2iteainvocation, spawns the process and passes it the information of the request (as defined by the CGI specification).

3.
The cgi2iteaspawned by the web server reads the HTTP request information supplied by the Web Server , opens a TCP/IP connection to the I*Tea Server and passes it this information.

4.
The Main Server Thread from the I*Tea Server accepts the connection from cgi2itea, reads the request parameters and places them in a request queue.

5.
An idle thread picks up the request, selects the appropriate Client Data and Tea Interpreter Context for this Web Client , and parses the document specified by the URL, executing the whole document as Tea script, or expanding text embeded Tea script blocks.

The Tea script blocks can access the request parameters, access the Web Client's private Client Data and manipulate its own variables in its Tea Interpreter Context and dynamically import and use Tea or Java libraries. Requests are serialized for each Web Client , so there is usually no need to worry about concurrency when manipulating these resources.

At any time, the script can output data through I*Tea API function calls and libraries to be sent back to the Web Client .

6.
The cgi2iteareads the output from the I*Tea Server , and passes it back to the Web Server , closes its connections and dies.

7.
The Web Server passes the cgi2iteaoutput back to the browser (which should render it on the user's browser window), closes its HTTP connection, and it is ready for another request.


next up previous
Next: Client Session Management Up: The I*Tea Application Server: Previous: Introduction
Systems Consultant
2000-09-25