STARTS
Stanford Protocol Proposal for Internet Search and Retrieval

Reference Implementation


Implementation Notes

This page describes some features of the STARTS reference implementation of interest to developers and testers. Information contained within is:

STARTS Release 1.1 : Extended Attribute Set Support, with Dublin Core demonstration

Package structure of the StartsServer application

The Java StartsServer application is organized into nine packages and a unpackaged main class. The main class is called Server. The packages are as follows:

Note: no resource or search engine specific code is located outside the wais and resource packages. Full documentation on these packages is available in javadoc format.

Other software used in the implementation

The reference implementation was built and/or uses as runtime a number of publicly available software packages:

A Note on Filter and Ranking Expressions

freeWAIS does not natively handle separate ranking and filter expressions. The behavior of separate ranking and filter expressions is handled as follows. Both the STARTS filter and ranking expressions are translated to wais queries. The two distinguishing components of STARTS ranking expressions are handled as follows:

Running and Testing the Implementation from the developer/tester point of view

Let's review the components of the reference implementation:

  1. The httpd server, which accepts HTTP STARTS requests -- communicates using CGI with...
  2. The perl CGI script, which bridges from HTTP requests to STARTS requests -- communicates via a TCP socket (default 6789) with...
  3. The StartsServer application, which does all STARTS processing except for the actual searching -- communicates via a Java native method call with...
  4. The modified freeWAIS waissearch code, which takes the ASCII WAIS search string from StartsServer and turns it into a WAIS (quasi-Z39.50) query, and which turns the WAIS results into an ASCIII result list for use by StartsServer -- communicates via a TCP socket (hard-coded as 5000 in StartsServer) with ...
  5. The freeWAIS server.

These components are all intended to be run on a Solaris machine, since freeWAIS has not been ported to NT. Yes, I know that I could run the freeWAIS server on Solaris and communicate with it from NT via sockets. However, I would still need to port the waissearch component to NT.

BUT, I wanted to use Symantec Café as my development environment, and this only runs on a Windows platform. To make the code run on both platforms, NT and Solaris, I've done the following:

Code Differences between NT and Solaris StartsServer

There are a few code fragments that are specific to the platform that StartsServer is running on. These fragments are all delimited by the comments:

/* !!!!! PLATFORM SPECIFIC CODE !!!!! */

/* !!!!! END PLATFORM SPECIFIC CODE !!!!! */

 The NT specific code is preceded by the comment:

/* !!!!! NT VERSION !!!!! */

The Solaris specific code is preceded by the comment:

/* !!!!! SOLARIS VERSION !!!!! */

These code fragments are located in the following files:

You should go through these files and uncomment the code for the appropriate platform and comment out the code for the other platform.

Dummy Server Bridge

In the main StartsServer source directory, you will find a Java source file called DummyServer.java. This is a simple server that listens on port 6790. This corresponds to the port opened in the NT specific code in wais/WAISSourceDescription.java. This dummy server accepts the ASCII WAIS search strings over the socket and then uses a native call to talk to the waissearch code.

Dummy Client

In the main StartsServer source directory, you will find a Perl script client.pl that you can run under Perl5 (on either Solaris or NT) to talk to StartsServer. This script takes two arguments <host> and <port> of StartsServer. The script will prompt you for the filter and ranking expression and the source on which the search should be done (cstr or linux).

To summarize, to test StartsServer on an NT machine (under Café) do the following:

  1. Copy the StartsServer directory tree over to Solaris.
  2. Start up freeWAIS on Solaris on port 5000 with the argument to the -d option being the location of the index files (e.g. waisserver -p 5000 -d <indexdir>).
  3. Start up the bridge server (DummyServer) on Solaris and it will listen on port 6790.
  4. Make sure the code fragments in the StartsServer version on your NT machine are set to the NT code.
  5. Start up StartsServer in the Café debugger.
  6. Use the Perl script client.pl to talk to the running StartsServer application (arguments should be <host> <port> of the StartsServer application.)

Send questions to help@ncstrl.org