Prev Up Next Index
Go backward to 4 Using the Toolkit
Go up to 4 Using the Toolkit
Go forward to 4.1.1 The Dispatch CGI

4.1 Data Servers

The DODS data server consists of a dispatch program and a set of filter programs. The dispatch program reads the incoming URL and decides which of the filter programs to run based on the URL suffix.

A typical DODS data request uses three filters: one to return the DAS (.das), one for the DDS (.dds), and the third for the data (.dods). A client can also request ASCII data (.asc or .ascii), usage information about the server (.info), or version information about the server and the data (.ver).

The task of building a DODS server can then be separated into the following steps:

 

  1. Create concrete classes of the entire BaseType hierarchy, with read functions for each data type. Certain APIs cannot handle certain DODS types. For these types, there must still be a concrete class, but it can have a read method with a null body.
  2. Write functions that use the native API to extract from the dataset the information needed to build the DODS DAS and DDS objects, and then build them with the methods those classes provide.

    NOTE: This step has nothing at all to do with DODS. This is between you and your data. DODS makes no demands on how these structures are created. That is, for example, if all the data to be served has the same DDS, feel free to cheat. The only thing that is important is that the structures accurately reflect the relationships of the data.

  3. Create filter programs to return the DAS, DDS, data, and server usage and version information.
  4. Create a dispatch program to parse an incoming URL and invoke the correct filter program.

To install the finished server, put the filter programs into a web server's CGI directory, and put the datasets to be served somewhere they can be seen by those filter programs. Refer to the The OPeNDAP User Guide for more details about installing a server.


Tom Sgouros, July 2, 2004

Prev Up Next