
	$Id: INSTALL-clients,v 1.4.8.3 2004/07/07 16:56:55 jimg Exp $

PREFACE

  This is a guide to installing OPeNDAP client software. This guide provides
  general help that applies to all the clients. Some clients might require
  additional steps; if that is the case there should be an INSTALL-<name>
  file for that client either in this directory or in the source code
  directory (if you down-loaded the source code) that provides any special
  information you need.

  Updated for version 3.4 of the DODS/NVODS/OPeNDAP software.

-----------------------------------------------------------------------------

CONTENTS

 QUICK INSTRUCTIONS

 INSTALLATION

 QUESTIONS

-----------------------------------------------------------------------------

QUICK INSTRUCTIONS

  Define a new environment variable DODS_ROOT to be the place where you
  untarred the executables. Add the $(DODS_ROOT)/bin directory to your PATH
  environment variable.  Run the client program.

-----------------------------------------------------------------------------

INSTALLATION

  Most OPeNDAP client programs are regular Unix executables and can be
  installed in any directory that is on your PATH environment variable, or
  run from your current working directory. The standard installation for
  OPeNDAP software involves creating a new directory tree and modifying your
  PATH to include the directories in that tree that contain executable
  programs. (See "Quick Instructions" above.)

  The client programs built using our DAP++ library (all of the ones we
  distribute, plus many of the ones distributed by others) make use of a
  configuration file to set the values for several parameters. These
  parameters control the following features: client-side caching,
  compression, network proxies, and the experimental AIS.

  The following describes the organization of the configuration file. See the
  sSection titled "AIS" for information that new feature.

-----------------------------------------------------------------------------

CONFIGURATION FILE

[This text is taken verbatime from src/dap/README.dodsrc]

  The client-side configuration file (.dodsrc) is used to configure how
  clients cache responses and how they interact with proxy servers. By
  default the configuration file resides in a user's home directory and is
  called `.dodsrc'. This can be changed by creating the environment variable
  DODS_CACHE_INIT and setting it to the full pathname of the configuration
  file.

  If a client starts and cannot find the configuration file, then one with
  default parameters will be created in the user's home directory. By default
  caching will be disabled but with the parameters for maximum cache size and
  expiration time set to 20M and 24 hours, respectively. By default no proxy
  server is configured.

  A sample configuration file looks like (the line numbers are not part of the
  file; they've been added to make the description clearer):

  0    # DODS client configuration file. See the DODS
  1    # users guide for information.
  2    USE_CACHE=0
  3    MAX_CACHE_SIZE=20
  4    MAX_CACHED_OBJ=5
  5    IGNORE_EXPIRES=0
  6    CACHE_ROOT=/home/jimg/.dods_cache/
  7    DEFAULT_EXPIRES=86400
  8    ALWAYS_VALIDATE=0
  9    # Request servers compress responses if possible?
  10   # 1 (yes) or 0 (false).
  11   DEFLATE=1
  12   # Proxy configuration:
  13   # PROXY_SERVER=<protocol>,<host[:port]>
  14   # PROXY_SERVER=,
  15   # PROXY_FOR=<regex>,<host[:port]>
  16   # PROXY_FOR=,
  17   # NO_PROXY_FOR=<protocol>,<host|domain>
  18   # NO_PROXY_FOR=,
  19   # AIS_DATABASE=<file or url>

  COMMENTS 
  Starting a line with a `#' makes that line a comment. 

  CACHING 

  The parameters on lines 2 through 8 determine how the DAP++ library will use
  its HTTP 1.1 cache. If the value of USE_CACHE is 1, the cache is active. A
  value of 0 turns off the cache. Make sure you use zero (0) and not the letter
  Oh (`O').

  The value of MAX_CACHE_SIZE sets the maximum size of the cache in megabytes.
  Once the cache reaches this size, caching more objects will cause cache
  garbage collection. The algorithm used is to first purge the cache of any
  stale entries and then remove remaining entries starting with those that have
  the lowest hit count. Garbage collection stops when 90% of the cache has been
  purged.

  The value of MAX_CACHED_OBJ sets the maximum size of any individual object in
  the cache in megabytes. Objects received from a server larger than this value
  will not be cached even if there's room for them without purging other
  objects.

  The parameter CACHE_ROOT contains the pathname to the cache's top directory.
  If two or more users want to share a cache, then they must both have read and
  write permissions to the cache root.

  If the value of IGNORE_EXPIRES is 1, then Expires: headers in response
  documents will be ignored. The value of DEFAULT_EXPIRES sets the expiration
  time for any response that does not include either an Expires or
  Last-Modified header. The value is given in seconds; 86,400 is 24 hours. In
  general you should *not* ignore the Expires header; the server probably had a
  good reason to send it along with the response. This parameter is here for
  unusual situations.

  Note: If a Last-Modified header is returned with the response, and there's
  *no* Expires header, the expiration time is is 10% of the difference between
  the current time and the LM time or 48 hours, whichever is smaller. Note that
  the cache ignores the DEFAULT_EXPIRES time in this case. Any request made
  before the expiration time will use the cached response without validation.
  Any request made after the expiration time will use a conditional GET.
  Servers that have been upgraded to 3.2 or greater will return a 304 response
  if the cached response is still valid or a new response if it is not valid.

  If the value of ALWAYS_VALIDATE is 1, then all accesses will be validated with
  the origin server. A value of 0 causes the cache to use the more complex
  expiration and validate algorithm.

  PROXY SERVERS

  Note that the parameters PROXY_SERVER, NO_PROXY and PROXY_FOR may be repeated
  to add multiple proxy servers, suppress proxy access for several hosts, etc.

  Lines 12 through 18 contain the parameters used to configure a proxy server.
  The parameter PROXY_SERVER configures a default proxy server. The format is

      PROXY_SERVER=<protocol>,<proxy host url>

  Currently the only supported protocol is `http'.
  <proxy host url> must be a full URL to the host running the proxy server.

  The PROXY_FOR parameter provides a way to specify that URLs which match a
  regular expression should be accessed using a particular proxy server. The
  syntax for PROXY_FOR is:

       PROXY_FOR=<regular expression>,<proxy host url>[,<flags>]

  Where:
  <regular expression> is an expression which matches the URL or group of
  URLs. For example `http://dax.po.gso.uri.edu/.*\.hdf' would match a URL
  ending in `.hdf' at dax.po.gso.uri.edu. The regular expression uses the POSIX
  basic syntax. 
  <proxy host url> is the same as above.
  <flags> is an optional integer that configures the regular expression
  matcher. A value of zero sets the default. The four flag values and there
  meanings are:

       If REG_EXTENDED is set, use POSIX extended syntax; otherwise,
       use POSIX basic syntax. To set this, add 1 to the value of <flags>.

       If REG_NEWLINE is set, then . and [^...] don't match newline.
       Also, regexp will try a match beginning after every newline. Set this
       by adding 2 to <flags>.

       If REG_ICASE is set, then consider upper- and lowercase
       versions of letters to be equivalent when matching. Add 4 to <flags>.

       If REG_NOSUB is set, then when PREG is passed to regexp, that
       routine will report only success or failure, and nothing about the
       registers. Add 8 to <flags>.

  The NO_PROXY parameter provides a simple way to say that access to a certain
  host should never go through a proxy without using the more complicated
  regular expression syntax. The syntax of NO_PROXY is:

      NO_PROXY=<protocol>,<hostname>

  where <protocol> is as for PROXY_SERVER
  <hostname> is the name of the host, not a url.

  AIS

  The AIS_DATABASE parameter tells clients where to look for the the AIS data
  base. The AIS is an experimental system for augmenting the metadata
  associated with a data set using files which may be located anywhere on the
  network. 

-----------------------------------------------------------------------------

AIS

  The AIS is an experimental system included in version 3.4 of the OPeNDAP
  software for evaluation purposes.

  [This text is copied verbatim from src/dap/README.AIS.] 

  Notes for the prototype AIS implementation:

  How to use the AIS. These notes correspond to the prototype AIS developed in
  March 2003. This version of the AIS works for DAS objects only.

  The AIS uses a configuration file which holds the mappings between a
  primary data source (aka an OPeNDAP server) and one or more AIS resources.
  The configuration file to use is named in the .dodsrc file using the
  AIS_DATABASE property.

  The AIS configuration file is described by src/dap/ais_database.dtd. A short
  file looks like:

      <?xml version="1.0" encoding="US-ASCII" standalone="no"?>
      <!DOCTYPE ais SYSTEM "http://www.opendap.org/ais/ais_database.dtd">

      <ais xmlns="http://xml.opendap.org/ais">

      <entry>
      <primary url="http://localhost/dods-test/nph-dods/data/nc/fnoc1.nc"/>
      <ancillary url="http://localhost/ais/fnoc1.nc.das"/>
      </entry>

      <entry>
      <primary url="http://localhost/dods-test/nph-dods/data/nc/fnoc2.nc"/>
      <ancillary rule="replace" url="ais_testsuite/fnoc2_replace.das"/>
      </entry>

      </ais>

  Each entry must have one <primary> element and may have one or more
  <ancillary> elements. The <ancillary> elements are applied in the order they
  are listed. The 'rule' attribute of <ancillary> determines how each AIS
  resource is combined with the primary resource. By default, attributes in the
  AIS resource are combined so that they overwrite existing attributes. If
  there's no conflict, the new attribute is added. This applies to containers
  as well as single attributes. The replace rule causes the AIS resource
  attributes to completely replace those of the primary resource. If the
  fall back rule is specified, the AIS resource's attributes are used only if
  the primary resource has *no* attributes.

  How to use the AIS: 

  Keep in mind that this is a prototype and is far, far from
  'feature-complete.'

  There are two ways to use the AIS right now. First you can use geturl's new
  -A option. This option tells geturl that when it gets a DAS object, it should
  merge into that object any AIS resources listed for the URL in the current
  AIS database (found in the .dodsrc file).

  Second you can program with the AIS. The class AISConnect can be used as a
  replacement for Connect. This class subclasses Connect and adds the capacity
  to use the AIS subsystem I've built. The AIS itself is contained in the
  classes AISMerge, AISDatabaseParser and AISResources.

-----------------------------------------------------------------------------

QUESTIONS

  There are several sources of information about OPeNDAP:
  The home page: http://www.opendap.org/.
  The user's manual: Available at the home page.
  User support: email support@unidata.ucar.edu

-----------------------------------------------------------------------------

James Gallagher
jgallagher@opendap.org