Appendix 1. How to get, install and run the CO4 protocol


Requirements

The CO4 protocol is being developed on Sun SparcStations under SunOS 4.4. It runs and has been tested under SunOS 4.3, 4.4, 5.4 (a.k.a. Solaris) and 5.5; it can be ported to other platforms either by INRIA or by yourself by recompiling the sources. It has to be used as a library linkable to other programs.

The CO4 protocol has been developed with KAPI and C. It is thus made of a set of C programs that should be compilable with any C compiler as soon as KAPI libraries are available.

In order to use KAPI and its extension, there must be a HTTP server running somewhere for which the installer has the privilege to add new cgi-scripts and new directories.

Getting the CO4 protocol and its documentation

The CO4 protocol and its documentation are available for public distribution under the terms of the COPYRIGHT file provided with the distribution. They can be retrieved through anonymous FTP (file transfer protocol) on the machine ftp.inrialpes.fr under the names:


/pub/sherpa/rapports/co4-manual.ps.gz
/pub/sherpa/logiciels/co4/current.tar.gz

Our HTTP server provides various information (among which the latest release and the on-line manual). The URLs are:

http://www.inrialpes.fr/sherpa/
http://co4.inrialpes.fr/docs/co4-manual.html

Do not hesitate to browse anywhere on our site (beginning with http://co4.inrialpes.fr); a lot of information about new developments is available there.

Installing the CO4 protocol

The CO4 protocol can be installed anywhere in your system provided that you follow the instructions below. The files can be obtained by:


$ gunzip co4-manual.ps.gz
$ gunzip co4.tar.gz | tar xf -

In the following, let $CO4DIR be the location of CO4 directory created by this installation. The content of the $CO4DIR (so the content of the tar-file) consists in the following files and directories:

COPYRIGHT

the INRIA Copyright notice;
README
the name says it;
examples
contains some sample repositories (useful for building your own);


sparc_4_4.0
contains C sources and libraries for SunOS 4.3/4.4 port;
sparc_5_gnu
contains C sources and libraries for SunOS 5.4/5.5 (Solaris) port with the gnu compiler;
src
contains the C sources for the CO4 protocol library;
kapi2.6e
contains the complete package for the KQML Application Programming Interface release 2.6e from EIT/Lockheed (see inside LICENSE notice);
config
contains configuration files for compilation;
doc
user and developers last minute documentation;

There are two specific installation steps since they can be carried out on independent different machines.

Setting up the ANS

HTTP_BIN_ROOT to the cgi-scripts root path of the HTTP server, where the CO4 scripts will be copied.

HTTP_DOC_ROOT to the document path of the HTTP server, where the CO4 directory containing all data will be created.


$ cd $CO4DIR/src
$ make http

The required cgi-scripts are then compiled and copyied to the CGI directory and the CO4 directory is created under the server root.

Compiling the CO4 library


$ cd $CO4DIR/src
$ make libco4

Running the examples as scripts

The scripts are provided in a following appendix 3.


$ cd $CO4DIR/examples/basic/src
$ make
$ cd ..
$ ./run-script <CO4_ANS_URL> SCRIPTS/<file>
The system will open several X-terminals for displaying the result of each repository execution (in the trace format, see p.).

Running the example as a HTTP server


$ cd $CO4DIR/examples/server/src
$ make
$ cd ..
$ ./create-server <CO4_ANS_URL> server_name
or
$ ./wakeup-server <CO4_ANS_URL> server_name

Several repositories can be created with these actions. The system provide the URLS of the created repositories. These repositories contain an integer value as content. They can be manipulated through a HTTP client (see Interface).

Using the CO4 protocol libraries

The CO4 protocol can be used from an alien language (C, C++, etc.). For that purpose, the CO4 protocol is supplied with several libraries (libkapi, libKapi2 and libCo4) along with the corresponding include file (co4.h) which enables its use from these languages.

Reporting bugs/getting advice

This can be done preferably through mail to troeps@inrialpes.fr.