DAP 4 Introduction James Gallagher OPe NDAP 11014

  • Slides: 12
Download presentation
DAP 4 Introduction James Gallagher OPe. NDAP 1/10/14

DAP 4 Introduction James Gallagher OPe. NDAP 1/10/14

Agenda • • Input on a Developer’s meeting All about DAP 4 The CDM,

Agenda • • Input on a Developer’s meeting All about DAP 4 The CDM, too Comparison and discussion of DAP 4 and CDM

DAP 3 DAP 4 • DAP 2: DDS, DAS, Data • DAP 4: DSR

DAP 3 DAP 4 • DAP 2: DDS, DAS, Data • DAP 4: DSR plus DMR, Data • This looks like the ‘name game’ but it’s a real difference! • While DAP 2 was a data model only, DAP 4 includes specification of the web services

DAP 4 Data Model • Coverages: Replace Grids with a more general model: Arrays,

DAP 4 Data Model • Coverages: Replace Grids with a more general model: Arrays, shared dimensions and maps – ‘Coverage’ is slang for ‘discrete coverage’ as defined by OGC’s abstract coverages specification – Maps define the Domain of a discrete function – The Array defines the Range – Shared dimensions provide the connection between Domain and Range • Tabular data: Sequences (a nest-able table) • Projection: subsetting based on data types • Filters: subsetting based on values

The Services Response (DSR) • DSR: Dataset Services Response is the ‘service endpoint’ •

The Services Response (DSR) • DSR: Dataset Services Response is the ‘service endpoint’ • This contains links to all of the other responses available from the server for a specific dataset • A key point for/of REST • In DAP 2 the ‘base URL’ was undefined; in DAP 4 the base URL for a dataset is the DSR

DSR and Content Negotiation • DSR provides links to all of the other responses

DSR and Content Negotiation • DSR provides links to all of the other responses • However, a server must implement Content Negotiation. • i. e. , a browser asking for the DMR winds up displaying a (HTML) web interface while a smart client parses XML

REST • • We have adopted a strict view of REST Not all of

REST • • We have adopted a strict view of REST Not all of DAP 4 fits; DAP 4 is not REST The DAP 4 web services are REST The DAP 4 data/constraint model is not

Dataset Metadata (DMR) • This response holds all of the variables and • Attributes

Dataset Metadata (DMR) • This response holds all of the variables and • Attributes • This defines the environment in which the Constraint will be evaluated

Data and Constraints • As with DAP 2, Data is returned in a two-part

Data and Constraints • As with DAP 2, Data is returned in a two-part response • Can request one or more variables • Can ‘slice’ the dimensions of array variables • Can filter both Tabular and Array data • (because a client must understand the data model and that cannot be expressed by links, this part of the ‘web API’ is not REST).

Examples… • The current draft specification has lots of examples: • http: //docs. opendap.

Examples… • The current draft specification has lots of examples: • http: //docs. opendap. org/index. php/DAP 4: _Specification_Volume_1 • The ‘test’ servers for DAP 4: • http: //54. 204. 231. 163: 8080/opendap/data/reader/dap 4/

JSON • Simple responses for single atoms - Data • Metadata (DMR) encoding

JSON • Simple responses for single atoms - Data • Metadata (DMR) encoding

Summary • DAP (DAP 2 and DAP 4) is based on datasets built of

Summary • DAP (DAP 2 and DAP 4) is based on datasets built of variables that share the characteristics of programming languages • Constraints are used to subset data on the server • DAP 4 is a REST API • DAP 4 specifies ‘modern’ web services