DAP4: DAP4 Using Multi-part Mime: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
(Created page with "DevelopmentDAP4 << Back to OPULS Development ==Background== After thinking about it as a result of a comment in...")
 
No edit summary
 
Line 3: Line 3:


==Background==
==Background==
After thinking about it as a result of a comment
As a result of a comment
in the OPULS/NOAA telecon, I think we should
in the OPULS/NOAA telecon, I think we should
reconsider using multi-part mime in a limited fashion
reconsider using multi-part mime in a limited fashion
in our serialization.
in our serialization. Basically I propose to resurrect
James' original proposal (see [[DAP 4.0 Design]]).


==Problem Addressed==
==Proposal==
The primary reason for this proposal is so that our
As with the original proposal, the multipart-mime
serialized form will "obey the forms" of HTTP
has two parts. The first is for the DMR and the
more closely. It is not essential, but I think it
second is for the whole, chunked serialized data.
would make our serialization play better with
The general form would look something like this.
existing HTTP technology.
<pre>
Content-Type: multipart/related; \
              type="application/vnd.org.opendap.dap4.dataset-metadata+xml"; \
              start="<<start id>>"; boundary="<<boundary>>"
--<<boundary>>
Content-Type: text/xml; charset=UTF-8
Content-Id: <<start id>>
Content-Length: ddddd
<<blank line>>
<<DMR text>>
--<<boundary>>
Content-Type: application/octet-stream
Content-Encoding: big-endian
Content-Length: -1
<<blank-line> 
<<chunked representation of the serialized data>>
--<<boundary>>
</pre>


My original objection to using multi-part mime
Notes:
was that it would, I thought, slow up decoding
# Every header line should be terminated with CRLF. The <<blankline>> is also terminated with CRLF.
of the serialization because of the need to search
# The above representation assumes that the DMR is not in chunked format.
for the UID separator lines. The following proposal
# The Content-Length value for the DMR counts the number of UTF-8 characters from the end of the blank line to the initial "--" of the boundary line.
tries to simplify the use of multi-part mime so that
# The chunked representation is still in our existing chunked format.
it has minimal impact on performance.
# I do not know if the start-id is required by the multipart-mime format. If not, then we should remove it.
# I am not sure about the "type" param of the "Content-Type" line at the beginning.


==Proposal==
[[User:dmh|Dennis Heimbigner]] Initial draft 3/19/2013

Latest revision as of 18:19, 20 March 2013

<< Back to OPULS Development

Background

As a result of a comment in the OPULS/NOAA telecon, I think we should reconsider using multi-part mime in a limited fashion in our serialization. Basically I propose to resurrect James' original proposal (see DAP 4.0 Design).

Proposal

As with the original proposal, the multipart-mime has two parts. The first is for the DMR and the second is for the whole, chunked serialized data. The general form would look something like this.

Content-Type: multipart/related; \
              type="application/vnd.org.opendap.dap4.dataset-metadata+xml"; \
              start="<<start id>>"; boundary="<<boundary>>"
--<<boundary>>
Content-Type: text/xml; charset=UTF-8
Content-Id: <<start id>>
Content-Length: ddddd
<<blank line>>
<<DMR text>>
--<<boundary>>
Content-Type: application/octet-stream
Content-Encoding: big-endian
Content-Length: -1
<<blank-line>   
<<chunked representation of the serialized data>>
--<<boundary>>

Notes:

  1. Every header line should be terminated with CRLF. The <<blankline>> is also terminated with CRLF.
  2. The above representation assumes that the DMR is not in chunked format.
  3. The Content-Length value for the DMR counts the number of UTF-8 characters from the end of the blank line to the initial "--" of the boundary line.
  4. The chunked representation is still in our existing chunked format.
  5. I do not know if the start-id is required by the multipart-mime format. If not, then we should remove it.
  6. I am not sure about the "type" param of the "Content-Type" line at the beginning.

Dennis Heimbigner Initial draft 3/19/2013