Expanded arguments for Constraint Expressions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽

<< back

Use Cases

Pass in a Constraint Expression (CE) using POST

  1. The DAP client builds a CE using the existing syntax as a UTF-8 string
  2. The client binds the POST information (request document body) to the URL and dereferences the URL
  3. The server detects an inbound request using POST
  4. The server rejects the POST request if the size of the request document body is larger then some upper limit set in a configuration file, returning an HTTP error code to the client
  5. The server processes the request and returns a response
  6. The client reads the response

Pass in a CE using both POST and GET

This is a variant on the first use case; the DAP client must combine the request document body with the query string and use them both with POST.

Build an array as an argument for a server function

  1. The BES evaluates a server function
  2. If the server function takes an array as an argument, it should use a new function named make_array()
  3. The make_array() function takes 2 arguments, specifying the type and shape of the array, followed by M values that are the elements of that array in row major order.
    1. The type and shape arguments are all string arguments
    2. The type must be the name of a value DAP2 simple type (Byte, ..., Float64).
    3. The type name does not have to be quoted
    4. The shape will be a valid array shape subexpression of the form "[size0][size1]...[sizeN]" where the size0, etc. is an unsigned integer and size0 * size1 * ... * sizeN is M
    5. The shape expression will be quoted
    6. The element values will be strings that will convert into elements of type type
    7. The element values do not have to be quoted
  4. make_array will build a DAP2 Array with the values and return a BaseType* to that array
  5. The current expression evaluator will pass that Array * into the outer function.

Definitions

Background

This should be completed before 26 June 2013.

The MIIC project would like to be able to pass modest sized arguments into server functions they have defined. The arrays should be passed into the functions as single BaseType Array objects, not as collections of 100s ++ of BaseType objects.

Design

Constraints that are large

POST support in the OLFS and passing large XML documents back to the BES.

DAP Array arguments in CE functions

There are two ways to implement this: First using a function that takes a long series of BaseType objects that hold individual values and using those to build a single array, and second, to modify the CE evaluator so that a long string of constant values can be formed into a DAP Array without the intermediate step of storing each of the values in a BaseType object.

Implementation of the first design is strait forward.

Implementation of the second design is more complicated.

Deliverables

A new version of Hyrax on the trunk such that a special branch can be formed for the MIIC project to use. Once the feature is stable, make a Hyrax 1.9 branch which should include this feature.

Period of use

26 June 2013 onward