One document matched: draft-moritz-core-proxy-encode-00.xml
<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
There has to be one entity for each item to be referenced.
An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY I-D.ietf-core-coap SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-core-coap-08.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
(Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
(using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="info" docName="draft-moritz-core-proxy-encode-00" ipr="noDerivativesTrust200902">
<!-- category values: std, bcp, info, exp, and historic
ipr values: full3667, noModification3667, noDerivatives3667
you can add the attributes updates="NNNN" and obsoletes="NNNN"
they will automatically be output with "(if approved)" -->
<!-- ***** FRONT MATTER ***** -->
<front>
<!-- The abbreviated title is used in the page header - it is only necessary if the
full title is longer than 39 characters -->
<title abbrev="CoAP Proxy Encode-To Option">CoAP Proxy Encode-To Option</title>
<!-- add 'role="editor"' below for the editors if appropriate -->
<!-- Another author who claims to be an editor -->
<author fullname="Guido Moritz" initials="G.M." role="editor"
surname="Moritz">
<organization>University of Rostock</organization>
<address>
<postal>
<street></street>
<!-- Reorder these if your country does things differently -->
<city>18051 Rostock</city>
<region></region>
<code></code>
<country>Germany</country>
</postal>
<phone>+49 381 498 7269</phone>
<email>guido.moritz@uni-rostock.de</email>
<!-- uri and facsimile elements may also be added -->
</address>
</author>
<date month="January" year="2012" />
<!-- If the month and year are both specified and are the current ones, xml2rfc will fill
in the current day for you. If only the current year is specified, xml2rfc will fill
in the current day and month for you. If the year is not the current one, it is
necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
purpose of calculating the expiry date). With drafts it is normally sufficient to
specify just the year. -->
<!-- Meta-data Declarations -->
<area>General</area>
<workgroup>CORE</workgroup>
<!-- WG name at the upperleft corner of the doc,
IETF is fine for individual submissions.
If this element is not present, the default is "Network Working Group",
which is used by the RFC Editor as a nod to the history of the IETF. -->
<keyword>6LoWPAN</keyword>
<keyword>CORE</keyword>
<keyword>CoAP</keyword>
<keyword>Proxy</keyword>
<!-- Keywords will be incorporated into HTML output
files in a meta tag but they have no effect on text or nroff
output. If you submit your draft to the RFC Editor, the
keywords will be used for the search engine. -->
<abstract>
<t>
The scope of this document is to propose a new option to be used in conjunction with the CoAP proxy mechanisms. Several content types can be converted stateless into each other. The conversion may result in much more efficient representation of the resource. But currently no mechanism exists to indicate the proxy to perform the compression.
</t>
</abstract>
</front>
<middle>
<section title="Introduction">
<t>
The scope of this document is to propose a new option to be used in conjunction with the CoAP proxy mechanisms in <xref target="I-D.ietf-core-coap">coap-08</xref>. Several content types can be converted stateless into each other.
</t>
<t>
Reasonable examples are XML to JSON or XML to EXI (and vice versa). All these representation formats can carry exactly the same structured data and information, while the conversion is stateless and requires no external information.
</t>
<t>
To realize scenarios/applications and reuse existing implementations as much as possible it might be required to use e.g. XML carried over HTTP in the backbone (i.e. unconstrained world) and e.g. EXI carried over CoAP in the LoWPAN (i.e. constrained world).
</t>
<t>
To map/convert CoAP to HTTP and vice versa dedicated proxies are defined in CoAP. But currently exists no mechanism to indicate the proxy to map/convert also the payload.
</t>
<t>
While starting with the 6LoWPAN/IPv6 optimizations and mappings at the addressing layer and ending up with the CoAP/HTTP optimizations and mappings at the application, optimize and map also the payload encoding to more efficient formats is the last step.
</t>
</section>
<section title="Requirements Language">
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in <xref
target="RFC2119">RFC 2119</xref>.</t>
</section>
<section title="Problem Statement">
<t>
The only currently existing way to realize a mapping of the payload representation is to implement it statically in the proxy. Thereby, each message to a CoAP endpoint is converted from e.g. XML into EXI and to EXI to XML for messages to HTTP endpoints. But if the proxy should be used for different applications it is required to keep a state in the proxy, i.e. which conversion/mapping has to be performed for which pair of endpoints.
</t>
<t>
In a deployment the knowledge about supported content types for a certain endpoint or resource might already be known by the requesting client. This knowledge was retrieved by the client e.g. through central registries (e.g. CoAP Resource Directory) during the discovery phase. For a request, the client then can use a proxy, but needs to indicate the proxy to convert the payload to the certain content type and vice versa for the response. Therefore a new CoAP option has to be defined.
</t>
</section>
<section title="Encode-to Option">
<t>
The typical scenario will be a HTTP client requesting a CoAP endpoint. If the HTTP client wants to indicate a required conversion of the payload it includes a Pragma HTTP header field in the request. The value of the Pragma header field is "encode-to=" followed by the content type the payload has to be converted to. Valid content types are derived from the existing media types for HTTP. If further parameters are required for the conversion, these parameters are added as parameters to the Pragma header field.
</t>
<t>
The HTTP-CoAP Proxy MUST process the Pragma header if present in the request and it includes the "encode-to" option. If the required conversion cannot be performed by the proxy it MUST response with a 415 Unsupported Media Type status code.
</t>
<t>
If the Proxy can perform the required conversion it replaces the existing message body for the CoAP request with the differently encoded one. To avoid keeping any state on the proxy, the origin content type is included in the CoAP request. Therefore the "encode-to" CoAP option (to be defined, format: string, length: 1-270 Byte, default:none) is used. The value of the CoAP "encode-to" option is the origin content type and if required including parameters for the conversion back. The value should re-use media type IDs as already defined for CoAP.
</t>
<t>
The CoAP endpoint is not required to process the "encode-to" option, but MUST echo the option and the value in the response if it decides not to process the option. Nevertheless, the CoAP endpoint MAY decide to process the option and encode the response in the format expressed in the "encode-to" option. In this case the "encode-to" option MUST NOT be echoed in the CoAP response.
</t>
<t>
The proxy receiving the CoAP respone message with the "encode-to" option MUST process this option and perform the required conversion before forwarding the message to the HTTP endpoint. In the HTTP response no further header field is required to be echoed back. If the proxy is not able to process the required conversion correctly it MAY forward the message body as it is to the HTTP endpoint (or SHOULD response with a 415 Unsupported Media Type status code?).
</t>
</section>
<section title="Alternative">
<t>
In the coap-misc draft a user-defined option definition is described. An alternative approach would be to define an application specific Pragma option also for CoAP. This option could occur more than ones in a request/response and fulfill all the required user-defined mechanisms. This may include the "encode-to" feature described in this draft.
</t>
</section>
<!-- Possibly a 'Contributors' section ... -->
<section anchor="IANA" title="IANA Considerations">
<t>No IANA issues have been identified in this draft.</t>
</section>
<section anchor="Security" title="Security Considerations">
<t>No Security issues have been identified in this draft.</t>
</section>
</middle>
<!-- *****BACK MATTER ***** -->
<back>
<!-- References split into informative and normative -->
<!-- There are 2 ways to insert reference entries from the citation libraries:
1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
(for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")
Both are cited textually in the same manner: by using xref elements.
If you use the PI option, xml2rfc will, by default, try to find included files in the same
directory as the including file. You can also define the XML_LIBRARY environment variable
with a value containing a set of directories to search. These can be either in the local
filing system or remote ones accessed by http (http://domain/dir/... ).-->
<references title="Normative References">
<!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
&I-D.ietf-core-coap;
&RFC2119;
</references>
<!-- Change Log
v00 2006-03-15 EBD Initial version
v01 2006-04-03 EBD Moved PI location back to position 1 -
v3.1 of XMLmind is better with them at this location.
v02 2007-03-07 AH removed extraneous nested_list attribute,
other minor corrections
v03 2007-03-09 EBD Added comments on null IANA sections and fixed heading capitalization.
Modified comments around figure to reflect non-implementation of
figure indent control. Put in reference using anchor="DOMINATION".
Fixed up the date specification comments to reflect current truth.
v04 2007-03-09 AH Major changes: shortened discussion of PIs,
added discussion of rfc include.
v05 2007-03-10 EBD Added preamble to C program example to tell about ABNF and alternative
images. Removed meta-characters from comments (causes problems). -->
</back>
</rfc>
| PAFTECH AB 2003-2026 | 2026-04-23 12:54:35 |