DAP4 Introduction James Gallagher OPeNDAP 1/10/14 Agenda • • • • Input on a Developer’s meeting All about DAP4 The CDM, too Comparison and discussion of DAP4 and CDM DAP3 DAP4 • DAP2: DDS, DAS, Data • DAP4: DSR plus DMR, Data • This looks like the ‘name game’ but it’s a real difference! • While DAP2 was a data model only, DAP4 includes specification of the web services DAP4 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 • 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 DAP2 the ‘base URL’ was undefined; in DAP4 the base URL for a dataset is the DSR 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 DAP4 fits; DAP4 is not REST The DAP4 web services are REST The DAP4 data/constraint model is not 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 DAP2, 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.org/index.php/DAP4:_Specification_Volume_1 • The ‘test’ servers for DAP4: • http://54.204.231.163:8080/opendap/data/reader/dap4/ JSON • Simple responses for single atoms - Data • Metadata (DMR) encoding Summary • DAP (DAP2 and DAP4) is based on datasets built of variables that share the characteristics of programming languages • Constraints are used to subset data on the server • DAP4 is a REST API • DAP4 specifies ‘modern’ web services