Bulletin Board System - Architecture

Main Message Screen (HTML file)

Allows the user to go to either the Message Posting screen or the Message Reading screen.

Message Posting  Screen (HTML file)

Allows the user to add a message to the database. This uses the form GET method to make the fields values available to the CGI program via the QUERY_STRING environment variable. The action (post or read ) that the CGI program should perform is hardcoded in the a hidden field.

Read Messages Screen (HTML file)

Allows the user to request the last 15 messages for a  specifed user.

Insert Message (Function in the CGI Program)

Accepts message from the caller and communicates it to the Data Manager via a socket connection.

Get  Messages (Function in the CGI Program)

Accepts the request from the caller and communicates a query to the Data Manager via a socket connection. It waits for the Data Manager (its forked subprocess) to return a result set, formats it on a dynamically created HTML page and returns it to the caller.

Data Manager (Pro*C program)

Accepts requests to insert or retrieve data to/from the database, establishes a new socket connection with the client and forks a new process (Insert Message or Get Messages) passing the new socket to it so that it may communicate with the client without tying up the published socket number. The child process will then perform the appropriate data operation and return a result set (for Selects) to the caller.

Insert Message (forked process)

Connects to the database, inserts the message and returns the status code to the client (cgi program) via the socket connection that was passed to it by the parent process.

Get Messages (forked process)

Connects to the database, retrieves messages according to specified constaints and returns them to the client (cgi program) via the socket connection that was passed to it by the parent process.

Message Database

Contains a single table that includes the following columns: