Gateway Service

From OPeNDAP Documentation


Gateway service.jpg

The Gateway Service provides Hyrax with the ability to apply DAP constraint expressions and server side functions to data available through any network URL. This is accomplished by encoding the data source URL into the DAP request URL supplied to the gateway_service. The gateway_service decodes the URL and uses the BES to to retrieve the remote data resource and transmit the appropriate DAP response back to the client. The system employs a white list to control what data systems the BES will access.

A Data Service Portal (DSP), such as Mirador will:

  • Provide the navigation/search/discovery interface to the data source.
  • Generate the data source URLs.
  • Encode the data source URLs.
  • Build a regular DAP query as the DAP dataset ID.
  • Hand this to the client (via a link or what have you in the DSP interface)

BES gateway_module

The gateway_module handles the gathering of the remote data resource and the construction of the DAP response.

The gateway_module:

  • Evaluates the data source URL against a white list to access permission.
  • Retrieves remote data source .
  • Determines data type by:
  1. Direct identification via the BesXmlApi. (You tell it.)
  2. HTTP Content-Disposition header
  3. Applying the BES.TypeMatch string to the last term in the path section of the data source URL.

The BES will not persist the data resources beyond the scope of each request.

OLFS gateway_service

The gateway_service is responsible for:

  • Decoding the incoming dataset URLs.
  • Building the request for the BES.
  • Returning the response from the BES to the client.

Encoding data source URLs

The data source URLs need to be encoded in the DAP data request URL that is used to access the gateway_service.

There are many ways to encode something in this context.

Prototype Encoding

As a prototype encoding we'll use an hex ascii encoding. In this encoding each character in the data source URL is expressed as is hexadecimal value using ascii characters.

Here is hexEncoder.tgz (sig), a gzipped tar file containing a java application can perform the encoding and decoding duties from the command line. Give it a whirl - it's a java application in a jar file. There is a bash script (hexEncode) that should launch it.

The source code for the EncodeDecode java class used by hexEncode is available here:

Example 1

source string

Example 2

Source string,51.625000,-102.625000,56.375000&format=netCDF&TIME=2002-10-03&resx=0.25&resy=0.25&interpolationMethod=Nearest%20neighbor



Example 3

source string