Client-Side CGI: A new technology
Eliot Young and Sky Coyote
Southwest Research Institute
September 1999
Boulder, Colorado
1. This talk is available on the web at:
All software, and more information about CSCGI is available at:
2. What is CSCGI?
- CSCGI allows a web browser to access and interact with stand-alone CGI programs
without the use of an internet connection or a web server.
CGI dataflow vs. CSCGI dataflow:

- Over a network, a web browser can call an external CGI program using internet
connection software and a remote web server.
- On a local system, the web browser can call a CSCGI program directly, without
a network, an internet connection, or a remote web server.

- CSCGI links HTML forms and Javascript in a webpage to a Java class interface
to a Netscape plugin.
- The Netscape plugin launches and communicates with an external CGI program.
- Data returned from the CGI program is used to display a new webpage, or can be sent
to Java applets embedded in the page.
3. Forms parser demo.
- HTML forms data are collected and converted to URL encoding by a Javascript function.

- Input data, environment variables, and command line are sent to a stand-alone CGI program
by a Netscape plugin embedded in the webpage.
- CSCGI library code in the external program parses the input data and converts names and
values back to plaintext.
- The external CGI program creates an "on-the-fly" HTML page listing all input data.
- This page is returned to the browser for display.

4. 3d surface generation and display applets.
- CSCGI can be used to give Java applets file reading and writing access.
- Data can be transferred between Java applets and disk files in either text or
binary mode.
- The surface generation applet creates and saves a set of binary surface data,
generated by an interactive equation in the applet.

- The surface display applet can read a binary data file (in either PC or Mac byte
ordering) and display the result as a 3d surface.
- The resulting 3d surface can be rotated and zoomed in realtime.

5. PDS CD-ROM image database search.
- The PDS search system can retrieve spacecraft images from a CD-ROM.
- This system searches for images within a database contained on the CD-ROM.
- Images are decompressed from a proprietary format.
Search system files and programs:

Search page:

- The "cdsearch" program creates "on-the-fly" HTML pages showing the results of the
search, and creates a directory of JPEG thumbnail images.

- The "showimage" program creates a full-size JPEG image from the compressed PDS
image file, and allows the brightness and contrast of the resulting image to be changed
by the user.


File information page:

6. Current Research.
- We are currently working with a group at Harvard University to use CSCGI to create
a local CD-ROM database of art history, using existing remote PERL programs.
- Automatic generation of HTML search pages from a search-layout page and associated
CSCGI program (with no end-user programming).
- Automatic encapsulation of legacy data (e.g. VAX records, PDP diskpacks, magnetic tape) into
modern machine-readable format (using HTML META tags or XML) for use with "standard"
search engines (again with no end-user programming).
- Use of Netscape and HTML as a common user interface for accessing heterogenous database
structures and data types.
7. Future Uses.
- Migrate existing websites to CD-ROM or hard disk (for running CGI programs
when no network is available).
- Run existing legacy code from a webpage (exploiting Netscape as a GUI).
Example: web interface to NAIF ephemerides generators.
- Possibilities outside astronomy:
- Hyperhelp (similar to MS help facility) with cross-linked references, no
network involved.
- Library search/query tools for databases on local CD-ROM or hard disk.
- Control of 3rd-party "scriptable" programs from a webpage, using additional technology
such as AppleScript applets and droplets.