How to build the DataDDX response in/with Hyrax: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
Line 1: Line 1:
== Suggested Division of Labor ==
== Suggested Division of Labor ==


[[Image:DAP4 DataDDX Design 2.png|400px|right|frame|Building the DataDDX with the OLFS making the initial and final headers. The BES/libdap/handler will have to make the 'part' headers except for the closing segment. This provides an easy way for the OLFS to combine several DataDDX responses in a single MP MIME document (easy in the sense that the OLFS does not have to pull apart the response from the BES).]]
[[Image:DAP4 DataDDX Design 2.png|400px|right|frame|'''Figure 1'''. Building the DataDDX with the OLFS making the initial and final headers. The BES/libdap/handler will have to make the 'part' headers except for the closing segment. This provides an easy way for the OLFS to combine several DataDDX responses in a single MP MIME document (easy in the sense that the OLFS does not have to pull apart the response from the BES).]]


[[Image:DAP4 DataDDX Design 1.png|right|thumb|This design would be good form the standpoint of support for protocols that don't want data responses in multipart MIME documents, but it's far from optimal since the DDS has to be built twice for each request]]
[[Image:DAP4 DataDDX Design 1.png|right|thumb|'''Figure 2'''. This design would be good form the standpoint of support for protocols that don't want data responses in multipart MIME documents, but it's far from optimal since the DDS has to be built twice for each request]]


The BES and OLFS work together to support DAP.
The BES and OLFS work together to support DAP but it is the job of the OLFS to correctly implement the DAP. The BES understands certain aspects of the DAP, but it does not actually build correct responses from DAP requests. Instead the OLFS reads a request and asks the BES to build parts of the correct response.
 
To build a DataDDX response, the OLFS and BES will work together as shown in Figure 1. When the OLFS receives and processes a DAP4 DataDDX request, it will first parse from that response the information the BES needs and send that along with both the Multipart MIME (MPM) ''start'' and ''boundary'' values. The BES will use a handler to build a C++ DDS object and return the MMP document that forms the payload of the DataDDX response, with a few wrinkles to be described shortly.
 
When the OLFS begin to receive the MMP payload for the DataDDX response, it will first write out the MIME headers for the response. Following that, it will stream the response from the BES, and following that, it will append (send to the stream) the closing section of the document.





Revision as of 21:52, 12 August 2009

Suggested Division of Labor

Figure 1. Building the DataDDX with the OLFS making the initial and final headers. The BES/libdap/handler will have to make the 'part' headers except for the closing segment. This provides an easy way for the OLFS to combine several DataDDX responses in a single MP MIME document (easy in the sense that the OLFS does not have to pull apart the response from the BES).
Figure 2. This design would be good form the standpoint of support for protocols that don't want data responses in multipart MIME documents, but it's far from optimal since the DDS has to be built twice for each request

The BES and OLFS work together to support DAP but it is the job of the OLFS to correctly implement the DAP. The BES understands certain aspects of the DAP, but it does not actually build correct responses from DAP requests. Instead the OLFS reads a request and asks the BES to build parts of the correct response.

To build a DataDDX response, the OLFS and BES will work together as shown in Figure 1. When the OLFS receives and processes a DAP4 DataDDX request, it will first parse from that response the information the BES needs and send that along with both the Multipart MIME (MPM) start and boundary values. The BES will use a handler to build a C++ DDS object and return the MMP document that forms the payload of the DataDDX response, with a few wrinkles to be described shortly.

When the OLFS begin to receive the MMP payload for the DataDDX response, it will first write out the MIME headers for the response. Following that, it will stream the response from the BES, and following that, it will append (send to the stream) the closing section of the document.


Handler

BES

OLFS