Once linked to the OPeNDAP libraries, an OPeNDAP client created from an existing program will work exactly as before when run using local files. However, a user can also specify an OPeNDAP Uniform Resource Locator (URL) to indicate some data file on a remote host machine. When the program receives this URL, the OPeNDAP libraries will recognize it as remote data, and issue a network request for the data. If a user has also installed an OPeNDAP server on the local machine, then local data may be accessed either through their local filenames or their OPeNDAP URL.
A URL is simply a unique name for some Internet resource. The figure 2.1 shows the parts of a typical OPeNDAP URL.
>dncview http://dods.gso.uri.edu/cgi-bin/nph-nc/data/fnoc1.nc.das ^ ^ ^ ^ ^ ^ ^ | | | | | | | Program | | | | | | Protocol-- | | | | | Machine Name----- | | | | Server------------------------------------ | | | Directory---------------------------------------- | | Filename---------------------------------------------- | URL Suffix-----------------------------------------------------
The parts of the URL are:
http as the protocol for its conversation, and hope that the target
machine has an httpd daemon listening.
httpd server process is
that it may be configured to execute Common Gateway Interface (CGI)
programs upon
receipt of a properly specified URL. This is used, for example, by
Internet search engines that ask a user to fill out a form. The CGI
specification will be specific to the server in question, and the
part of the URL that follows the CGI name is passed to the CGI upon
invocation. This data may include a file name, but it may as easily
be some arbitrary string of instructions. The OPeNDAP server is simply
a set of CGI scripts executed on demand by the httpd server.
Here, the OPeNDAP server is represented by a CGI script called
nph-nc.
The URL in figure 2.1 shows a client
request to the httpd server on the machine
dods.gso.uri.edu, for a netCDF dataset (specified by the
nph-nc in the cgi-bin directory) contained in a file
called fnoc1.nc. Upon receiving this URL, the httpd
server executes the specified OPeNDAP server module (nph-nc), which
retrieves the file is in a directory called data relative to
wherever the httpd server looks for its data6.
OPeNDAP URLs can get somewhat more complicated than this simple description. In particular, they can contain "constraint expressions" that limit a request to data satisfying a set of conditions, and they can contain requests to specific OPeNDAP services, besides the data delivery service suggested here. Constraint expressions are described in more detail in Section 4.1, while the array of services provided by OPeNDAP servers are described in Section 2.2.