(c) Copyright 1994 Wide Area Information Servers, Inc


WAIS Client Protocol Toolkit

Welcome to Release 1.0.1 of the client protocol toolkit!  This release
contains the source code and documentation of an Application Programmers
Interface (API) for running both z39.50-1988 and Z39.50-V2 information
retrieval protocols.  It is expected that the functionality of the existing
protocols will be extended, and that the API will be extended to include
other protocols at some future time.  This release also contains a
demonstration program that shows the use of the client protocol toolkit
API.



Installation

For installation, follow the instructions in the INSTALL file located in
this directory.  Read the "Demo Program" section to run the demonstration
program.



Differences and Terminology of Document Structure in Z39.50-88 and Z39.50-V2

In the 88 protocol, a document (or record) from a database may be available
in multiple display types, called WAIS types, such as TEXT, GIF, JPEG, etc.

In the V2 protocol, a document may be arranged in a more structured way.  A
document may be made up of multiple "elements", such as an ABSTRACT, a
TABLE OF CONTENTS, a CITATION, etc., where each element may itself contain
subelements, such as CHAPTERS, SECTIONS, etc.  Each element may be
available in a number of "variants", where each variant represents the same
information, but in a different form.  For example, the ABSTRACT element
may be available in English, French, and German variants, and/or in a TEXT,
HTML, or GIF format.  Languages are specified using the MARC Language Codes
(soon to be adopted as a NISO standard), and formats are specified using
the IETF MIME types.  The server may specify a variety of other variant
information as deemed important by the server (e.g. character set, cost,
etc.).



Z39.50 as a Connectionless or Session-Based Protocol

Z39.50 may or may not operate in a connectionless manner.  An interactive
session may be established by the client, whereby any number of
transactions may occur during the session.  The session may be closed at
any time by the client; and if left open for an extended time, well-behaved
servers typically time out and close the session automatically.



User Authentication

Commercial Z39.50 servers may require authentication by the client.
Authentication may be required either during initialization by the client,
or, if the client supports it, the server may present an authentication
challenge to the client in the middle of a search or retrieve operation.
Because Z39.50 may operate in a session-based manner, the server does not
need to reauthenticate on every transaction.  The server may instead
authenticate on a per-session or on a per-database basis.  This
demonstration client toolkit does not currently include authentication
handling; if your application requires authentication, please forward
requests to "client-dev@wais.com".



Demo Program

After installation, cd to the demo directory, and follow the directions in
the README file.  Using the API functions demonstrated, create your own
custom WAIS client.

The Demo Program will first demonstrate Z39.50-V2, followed by a
demonstration of Z39.50-88.  Things to notice:
   - During initialization, the client negotiates a buffer size with the 
     server.  This occurs in both 88 and V2.
   - A search produces a result list (or set).  In 88, retrieval is performed
     by doing a search, where the result list produced contains exactly one
     document.   In V2, retrieval may be performed by either doing a search
     (as in 88), or by selecting a document by position in a result list
     (where the result list was generated by a previous search).  For
     example, suppose the user perform a search that produces 20 hits in the
     result list.  Then performs a retrieval on item #2 from the result list.
     This can only be done using the V2 protocol.  This behavior is 
     demonstrated in the demo program.  If you are using 88, and you try to
     perform a retrieval by position in a result set, the API will signal
     an error, as demonstrated in the final retrieval using the 88 protocol.
   - During retrieval, the client asks for pieces of a variant; when the
     end of the variant has been reached, a diagnostic is sent to say
     that you've reached the end of the variant.  This is printed out by
     the demonstration program.  This is not an error.
   - The lengths of all variants are passed in V2; in 88 only the document
     length of the indexed file is passed.  Although not shown in the
     demonstration program, dates in 88 are YYYYMMDD; in V2, dates also
     include the time YYYYMMDDHHMMSS.  In V2, the time is generally
     expressed as local time (local to the server), but the protocol also
     provides support for UTC.
   - In 88, relevance feedback can only be performed by specifying a record
     identifier (formerly called a docId).  In V2, relevance feedback can
     also be performed by sending the relevant text of a document.  This is
     useful for performing relevance feedback on documents from other servers.



The Future

At the time of this writing, Z39.50-1994 is under ballot.  This specifies
both Version 2 and Version 3 of Z39.50.  It includes a number of features
useful to a smart client.  Some of these features include:
  -- Sorting of a result set.
  -- Item Ordering.
  -- Explain of the available databases, including searchable fields.
  -- Periodic Queries.  
There is also ongoing work in the area of natural language specification
within the protocol.



Support

Please send comments to client-dev@wais.com.  Support for the client
protocol toolkit may be limited, but other support arrangements may be
formally negotiated with WAIS Inc.
