Presentation is loading. Please wait.

Presentation is loading. Please wait.

9/21/04 James Gallagher Server-Side: The Basics This part of the workshop contains an overview of the two servers which OPeNDAP has developed. One uses.

Similar presentations


Presentation on theme: "9/21/04 James Gallagher Server-Side: The Basics This part of the workshop contains an overview of the two servers which OPeNDAP has developed. One uses."— Presentation transcript:

1 9/21/04 James Gallagher Server-Side: The Basics This part of the workshop contains an overview of the two servers which OPeNDAP has developed. One uses the Common Gateway Interface (CGI) technology while the other uses Java Servlets. This section also covers the operations common to all DAP 2.0 compliant servers. Finally, we also discuss various security concerns such as configuring a server with username/password access.

2 9/21/04 James Gallagher Two Servers from OPeNDAP ● Both use a web server to provide networking and access control ● One server* uses C/C++ and CGIs ● One server uses Java and Servlets ● Each can serve several types of data

3 9/21/04 James Gallagher What the Servers do ● Return the four objects defined by theData Access Protocol, version 2Data Access Protocol – DAS: Semantic metadata – DDS: Syntactic metadata – DataDDS: Data with the relevant DDS parts – Error: When a request cannot be satisfied

4 9/21/04 James Gallagher Additional Server Responses ● Both servers also support some 'services.' ● Some service responses are made by transforming one or more of the object responses. ● Services: – ASCII: Get data in ASCII – Info: HTML-encoded metadata – Simple access interface: An HTML form

5 9/21/04 James Gallagher More Services... ● The ASCII, Info and Interface (aka HTML)services work with a dataset. ● Other services return information about the server: – Version: Text data that identifies the server – Directory: Provides a way to 'browse' data sources – Help: How to ask the server for different responses

6 9/21/04 James Gallagher Summary of Server Responses ● Four object-responses defined by DAP 2.0 – DAS, DDS, DataDDS, Error ● Six services: – ASCII, HTML metadata, HTML interface, Directory – Version, Help

7 9/21/04 James Gallagher How a Server Handles a Request ● The URL contains the host and protocol ('localhost' and 'http' in this example); IP addressing locates httpd on the correct machine. ● The server recognizes the URL as referencing a CGI. ● The CGI is passed information from the URL. ● See also: Server Installation GuideServer Installation Guide

8 9/21/04 James Gallagher The CGI Server's Architecture ● httpd: A web daemon ● Dispatch Script: The CGI program ● A collection of 'handlers;' each builds one of the responses ● The dispatch script chooses which handler to run

9 9/21/04 James Gallagher How the Server Handles a Request ● '/opendap/nph-dods' selects the nph-dods CGI based on the web server's configuration. ● The '.dds' suffix tells nph- dods this is a request for a DDS object. ● The data source name's '.nc' suffix tells nph-dods to use the netCDF family of handlers

10 9/21/04 James Gallagher OPeNDAP Servlet Compared to CGI ● The Servlet- and CGI-based server's are conceptually similar: – Both use a web server – Both use a dispatch mechanism (CGI: nph-dods, Servlet: DODSServlet.java) – Both delegate response generation to 'handlers' (CGI: programs written in C++, Servlet: Java classes)

11 9/21/04 James Gallagher How the Server Chooses a Handler ● The CGI-based server uses a configuration file named 'DODS/etc/dods.rc'. ● In that file, regular expressions are used to match URLs to specific handlers. ● The server uses 'real' regular expressions which can be quite complicated, but in general a server's default dods.rc file is sufficient.

12 9/21/04 James Gallagher Servlet/CGI Comparison, cont. ● Differences: – The CGI server uses Perl for the Dispatch, the Servlet software uses Java – The CGI server's handlers can be written in C++, C, Python,..., anything that can produce an Unix or Win32 executable. – The Servlet server's handlers are written in Java.*

13 9/21/04 James Gallagher Choosing a server ● Are the data stored in a 'standard' format? ● Are the data stored in files that need to be aggregated? ● Are the data stored using an 'in-house' format? ● Other considerations: CGI- or Servlet-based?

14 9/21/04 James Gallagher Standard formats ● The Perl/C++ CGI-server supports: – netCDF – HDF4, HDF5* – Matlab – U. of Miami DSP ● The Java Servlet-server supports: – SQL (uses JDBC drivers) – netCDF

15 9/21/04 James Gallagher Aggregation ● The Java/Servlet-based Aggregation Server works with netCDF files and other Array data. ● The CGI-based JGOFS server can aggregate some types of point data. ● The GrADS Data Server (GDS) from COLA can also perform aggregations.

16 9/21/04 James Gallagher Support for in-house formats ● The Perl/C++ CGI-based server: – Data which can be described using FreeForm – Data which can be read using a JGOFS method ● The Java/Servlet-based server: – Data in relational databases can be served using the DODS Relational Database Server (DRDS)*

17 9/21/04 James Gallagher Installing and Testing a Server ● CGI-based servers ● Servlet-based servers ● Security

18 9/21/04 James Gallagher Install the CGI-Based Server ● Configure the web server – Choose directories for both the server and the data – Modify the web server's configuration accordingly ● Use the installServers script to copy the CGI- Based server's components ● Copy or link the data files

19 9/21/04 James Gallagher Servlet-based Servers ● Instructions for Tomcat; other servlet engines* are similar ● Configure Tomcat ● Copy the dods.war file into Tomcat's webapps directory and restart Tomcat ● Edit the WEB-INF/web.xml as per the server directions

20 9/21/04 James Gallagher Security ● Security functions are provided by the web server and/or servlet engine ● Apache provides: – HTTP over SSL (HTTPS) – Several authentication schemes (Basic, Digest) – 'Realm' limits per user, group and IP address ● OPeNDAP servers support all of these ● OPeNDAP clients support HTTP proxies


Download ppt "9/21/04 James Gallagher Server-Side: The Basics This part of the workshop contains an overview of the two servers which OPeNDAP has developed. One uses."

Similar presentations


Ads by Google