One document matched: draft-bormann-coap-misc-01.xml


<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<rfc ipr="trust200902" docName="draft-bormann-coap-misc-01"
     category="info" >

<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes" ?>

  <front>
    <title abbrev="CoAP-misc">
      Miscellaneous additions to CoAP
    </title>
    <author initials="C" surname="Bormann" fullname="Carsten Bormann">
      <organization>Universität Bremen TZI</organization>
      <address>
        <postal>
          <street>Postfach 330440</street>
          <city>Bremen</city>
          <code>D-28359</code>
          <country>Germany</country>
        </postal>
        <phone>+49-421-218-63921</phone>
        <facsimile>+49-421-218-7000</facsimile>
        <email>cabo@tzi.org</email>
      </address>
    </author>

    <date year="2010" month="June" day="25"/>

    <area>General</area>
    <workgroup>CoRE Working Group</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>
        This short I-D makes a number of partially interrelated
        proposals how to solve certain problems in the CoRE WG's main
        protocol, CoAP.
      </t>
    </abstract>
  </front>

  <middle>


<section anchor="problems" title="Introduction">

<t>The CoRE WG is tasked with standardizing an
Application Protocol for Constrained Networks/Nodes, CoAP.
This protocol is intended to provide RESTful <xref target="REST"/> services not
unlike HTTP <xref target="RFC2616"/>,
while reducing the complexity of implementation as well as the size of
packets exchanged in order to make these services useful in a highly
constrained network of themselves highly constrained nodes.</t>

<t>This objective requires restraint in a number of sometimes conflicting ways:</t>

<t><list style='symbols'>
  <t>reducing implementation complexity in order to minimize code size,</t>
  <t>reducing message sizes in order to minimize the number of fragments
needed for each message (in turn to maximize the probability of
delivery of the message), the amount of transmission power needed
and the loading of the limited-bandwidth channel,</t>
  <t>reducing requirements on the environment such as stable storage,
good sources of randomness or user interaction capabilities.</t>
</list></t>

<t>This draft attempts to address a number of problems not yet adequately
solved in <xref target="I-D.ietf-core-coap"/>.  The solutions proposed to these
problems are somewhat interrelated and are therefore presented in one
draft.</t>

<t>In this document, the key words “MUST”, “MUST NOT”, “REQUIRED”,
“SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”,
and “OPTIONAL” are to be interpreted as described in BCP 14
<xref target="RFC2119"/> and indicate requirement levels for compliant CoAP
implementations.</t>

</section>
<section anchor="accept" title="A Compact Accept Option">

<t>A resource may be available in a number of representations.
Without some information from the client, a server has no easy way to
decide which of these would be best served.
HTTP has an Accept: request header that a client can use to indicate
the media types supported, allowing the server to decide.  This header
is somewhat unpopular as, for a web browser, there are too many media
types to choose from, so — even with wildcards — there is no
meaningful information to put there.  (This has changed a bit for AJAX
calls, which may indeed have a specific media type preference.)
It is unlikely that machine-to-machine communication would have the
same problem.</t>

<t>A similar function to the HTTP Accept: header could be added to CoAP
as an option in a much simpler way.  The CoAP Accept option would
simple carry a value that is a sequence of octets, each of which is an
acceptable media type for the client, in the order of preference (see
<xref target="acceptheader"/>).  If no Accept option is given, the client does not
express a preference.</t>

<figure anchor="acceptheader" title="Accept option value: A sequence of media types"><artwork><![CDATA[
        0
        0 1 2 3 4 5 6 7
       +-+-+-+-+-+-+-+-+
       |   mediatype   |
       +-+-+-+-+-+-+-+-+

        0                   1
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |   mediatype1  |   mediatype2  |    etc.
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>

<t>Accept also has to be given an option type code, e.g. 7, in Table 2 of
<xref target="I-D.ietf-core-coap"/>.</t>

<t>The other addition that would be required is an error code that
mirrors HTTP’s “415 Unsupported Media Type”.  This is indeed already
listed as CoAP Code 35 in Table 3 of <xref target="I-D.ietf-core-coap"/>.</t>

</section>
<section anchor="duration" title="Representing Durations">

<t>Various message types used in CoAP need the representation of
<spanx style='strong'>durations</spanx>, i.e. of the length of a timespan.
In SI units, these are measured in seconds.
Where CPU power and memory is abundant, a duration can almost always
be adequately represented by a non-negative floating-point number
representing that number of seconds.
Historically, many APIs have also used an integer representation,
which limits both the resolution (e.g., if the integer represents the
duration in seconds) and often the range (integer machine types
have range limits that may become relevant).
UNIX’s <spanx style='verb'>time_t</spanx>  (which is used for both absolute time and durations)
originally was a signed 32-bit value of seconds, but
was later complemented by an additional integer to add microsecond
(<spanx style='verb'>struct timeval</spanx>) and then later nanosecond (<spanx style='verb'>struct timespec</spanx>)
resolution.</t>

<t>Three decisions need to be made for each application of the concept of
duration:</t>

<t><list style='symbols'>
  <t>the <spanx style='strong'>resolution</spanx>.  What rounding error is acceptable?</t>
  <t>the <spanx style='strong'>range</spanx>.  What is the maximum duration that needs to be represented?</t>
  <t>the <spanx style='strong'>number of bits</spanx> that can be expended.</t>
</list></t>

<t>Obviously, these decisions are interrelated.  Typically, a large range
needs a large number of bits, unless resolution is traded.  For most
applications, the actual requirement for resolution are limited for
longer durations, but can be more acute for shorter durations.</t>

<section anchor="pseudo-fp" title="Pseudo-Floating Point">

<t>Constrained systems typically avoid the use of floating-point (FP)
values, as</t>

<t><list style='symbols'>
  <t>simple CPUs often don’t have support for floating-point datatypes</t>
  <t>software floating-point libraries are expensive in code size and slow.</t>
</list></t>

<t>In addition, floating-point datatypes used to be a significant element
of market differentiation in CPU design; it has taken the industry a
long time to agree on a standard floating point representation.</t>

<t>These issues have led to protocols that try to constrain themselves to
integer representation even where the ability of a floating point
representation to trade range for resolution would be beneficial.</t>

<t>The idea of introducing <spanx style='emph'>pseudo-FP</spanx> is to obtain the increased range
provided by embedding an exponent, without necessarily getting stuck with hardware
datatypes or inefficient software floating-point libraries.</t>

<t>For the purposes of this draft, we define an (n,e)-pseudo-FP as a
fixed-length value of n bits, e of which may be used for an exponent.
<xref target="pseudofp"/> illustrates an (8,4)-pseudo-FP value.</t>

<figure anchor="pseudofp" title="An (8,4) pseudo-FP representation"><artwork><![CDATA[
  0   1   2   3   4   5   6   7
+---+---+---+---+---+---+---+---+
| 0...          value           |
+---+---+---+---+---+---+---+---+

+---+---+---+---+---+---+---+---+
| 1... mantissa |    exponent   |
+---+---+---+---+---+---+---+---+

]]></artwork></figure>

<t>If the high bit is clear, the entire n-bit value (including the high
bit) is the decoded value.  If the high bit is set, the mantissa
(including the high bit, but with the exponent field cleared out) is
shifted left by the exponent to yield the decoded value.</t>

<t>The (n,e)-pseudo-FP format can be decoded with a single line of code
(plus a couple of constant definition), as demonstrated in
<xref target="pseudofp-decode"/>.</t>

<figure anchor="pseudofp-decode" title="Decoding an (8,4) pseudo-FP value"><artwork><![CDATA[
#define N 8
#define E 4
#define HIBIT (1 << (N - 1))
#define EMASK ((1 << E) - 1)
#define MMASK ((1 << N) - 1 - EMASK)

#define DECODE_8_4(r) (r < HIBIT ? r : (r & MMASK) << (r & EMASK))

]]></artwork></figure>

<t>Only non-negative numbers can be represented by this format.
It is designed to provide full integer resolution for values
from 0 to 2^(n-1)-1, i.e., 0 to 127 in the (8,4) case, and a mantissa
of n-e bits from 2^(n-1) to (2^n-2^e)*2^(2^e-1), i.e., 128 to
7864320 in the (8,4) case.  By choosing e carefully, resolution can be
traded against range.</t>

<t>Note that a pseudo-FP encoder needs to consider rounding; different
applications of durations may favor rounding up or rounding down the
value encoded in the message.  This requires a little more than a
single line of code (which is left as an exercise to the reader, as
the most efficient expression depends on hardware details).</t>

</section>
<section anchor="duration-type" title="A Duration Type for CoAP">

<t>CoAP needs durations in a number of places.  In
<xref target="I-D.ietf-core-coap"/>, durations occur in the option
<spanx style='verb'>Subscription-lifetime</spanx> as well as in the option <spanx style='verb'>Max-age</spanx>.
(Note that the option <spanx style='verb'>Date</spanx> is not a duration, but a point in time.)
Other durations of this kind may be added later.</t>

<t>Most durations relevant to CoAP are best expressed with a minimum
resolution of one second.  More detailed resolutions are unlikely to
provide much benefit.</t>

<t>The range of lifetimes and caching ages are probably best kept below
the order of magnitude of months.
An (8,4)-pseudo-FP has the maximum value of 7864320, which is about 91
days; this appears to be adequate for a subscription lifetime and
probably even for a maximum cache age.
(If a larger range for the latter is indeed desired, an
(8,5)-pseudo-FP could be used; this would last 15 milleniums, at the
cost of having only 3 bits of accuracy for values larger than 127
seconds.)</t>

<t><list style='hanging'>
  <t hangText='Proposal:'>
  A single duration type is used throughout CoAP, based on an
(8,4)-pseudo-FP giving a duration in seconds.</t>
  <t hangText='Benefits:'>
  Implementations can use a single piece of code for managing all
CoAP-related durations.</t>
  <t>In addition, length information never needs to be managed for
durations that are embedded in other data structures: All durations
are expressed by a single byte.</t>
</list></t>

</section>
</section>
<section anchor="uri-encoding" title="URI encoding">

<t>In HTTP-based systems, URIs can reach significant lengths.
While CoAP-based systems may be able to sidestep the most egregious
excesses (mostly by simply applying REST principles), a URI such as</t>

<t><list style='empty'>
  <t>/.well-known/resources</t>
</list></t>

<t>can use up one third of the available payload in a CoAP message
transported in a single 6LoWPAN packet.
Is there a way to encode these URIs in a more efficient way?</t>

<t>Several proposals have been made on the CoRE mailing list, e.g. applying
the principle of base64-encoding <xref target="RFC4648"/> in reverse and using only
6 bits per character.  However, due to rounding errors and occasional
characters that are not in the 64-character subset chosen to be efficiently
encodable, the actual gains are limited.  Similarly, using 7 bits per
character (assuming URIs contain only ASCII characters) only gives a
best-case gain of 12.5 %, and that only in the case the URI is a multiple
of 8 characters long.  On the other hand, the complexity (and danger
of subtle interoperability problems) is not entirely trivial.</t>

<t>We will proceed by first proposing an URI encoding that is slightly
more efficient than the abovementioned ones, then rejecting even that
for its unconvincing cost-benefit ratio, and finally taking up Henning
Schulzrinne’s proposal to add state.</t>

<section anchor="stateless" title="An efficient stateless URI encoding">

<t>There is very little redundancy by repetition in a typical URI,
rendering popular compression methods such as LZ77 (as implemented in
in the widely used DEFLATE algorithm <xref target="RFC1951"/>) rather ineffective.</t>

<t>For the short, non-repetitive data structures that URIs tend to be, efficient
stateless compression is pretty much confined to Huffman (or, for even
more complexity, arithmetic) coding.  The complexity can be reduced
significantly by moving to n-ary Huffman coding, i.e., optimizing not
to the bit level, but to a larger level of granularity.  Informal
experiments by the author show that a 16ary Huffman coding is close to
optimal for reasonable URI lengths.  In other words, basing the
encoding on nibbles (4-bit half-bytes) is both nearly optimal and
relatively inexpensive to implement.</t>

<t>The actual letter frequencies that will occur in CoAP URIs are hard to
predict.  As a stopgap, the author has analyzed an HTTP-based URI
corpus and found the following characters to occur with high
frequency:</t>

<t><list style='empty'>
  <t>%.aeinorst</t>
</list></t>

<t>In the encoding proposed, each of these ten highly-compressed
characters is represented by a
single 4-bit nibble.  As the % character is used for hexadecimal encoding in
URIs, two additional nibbles are used to provide the numeric value of
the two hexadecimal
numbers following the % character (the original URI will only be
properly reconstituted if these
are upper-case as they should be according to section 2.1 of the URI
specification <xref target="RFC3986"/>; the encoder can choose to send all three
characters in dual-nibble format if that matters).  An encoder could also map non-ASCII
characters to this three-nibble form, even though they are not allowed
in URIs.  This gives compatibility with the %-encoding required by
<xref target="RFC3986"/>.</t>

<t>All other characters are represented by both of their nibbles.  The
resulting sequence of nibbles is reconstituted into a sequence of
bytes in most-significant-nibble-first order.  Any unused nibble in
the last byte of an encoding is set to 0.  (Upon decoding, this
padding can be readily distinguished from another % combination as
this would require another byte after the last byte.)  The encoding is
summarized in <xref target="nibbles"/>.</t>

<figure anchor="nibbles" title="A nibble-based URI encoding"><artwork><![CDATA[
  0                                       1
  0   1   2   3   4   5   6   7   8   9   0   1
+---+---+---+---+
|    1, 8-F     |   .aeinorst
+---+---+---+---+   189ABCDEF

+---+---+---+---+---+---+---+---+
|      2-7      |      0-F      |   other ASCII
+---+---+---+---+---+---+---+---+

+---+---+---+---+---+---+---+---+---+---+---+---+
|       0       |      0-F      |      0-F      |   %HH
+---+---+---+---+---+---+---+---+---+---+---+---+

]]></artwork></figure>

<t>An example encoding for <spanx style='verb'>/.well-known/resources</spanx> (where the initial
slash is left out, as proposed for abs-path URIs) is given in
<xref target="nibble-example"/>.  While the more than 28 % savings in this example
may seem just an accident, the HTTP-based corpus indeed
shows an average savings of about 21.8 %, i.e. the sum of the lengths
of the encoded version of all URIs in the corpus is about 78.2 % of
the sum of the length of all URIs.  (The savings should be noticeably
higher with a more RESTful selection of URIs than was available for
this experiment.)</t>

<figure anchor="nibble-example" title="Nibble-based URI encoding: 21 -> 15 bytes"><artwork><![CDATA[
     0                          1                             2
     1  2  3  4  5  6  7  8  9  0  1  2  3  4  5  6  7  8  9  0  1
  /  .  w  e  l  l  -  k  n  o  w  n  /  r  e  s  o  u  r  c  e  s

    2e 77 65 6c 6c 2d 6b 6e 6f 77 6e 2f 72 65 73 6f 75 72 63 65 73
->
    1  77 9  6c 6c 2d 6b b  c  77 b  2f d  9  e  c  75 d  63 9  e
  = 17 79 6c 6c 2d 6b bc 77 b2 fd 9e c7 5d 63 9e
]]></artwork></figure>

</section>
<section anchor="stateful" title="Stateful URI compression">

<t>Is the approximately 25 % average saving achievable with Huffman-based
URI compression schemes worth the complexity?
Probably not, because much higher average savings can be achieved by
introducing state.</t>

<t>Henning Schulzrinne has proposed for a server to be able to supply a
shortened URI once a resource has been requested using the full-length
URI.
Let’s call such a shortened referent a <spanx style='emph'>Temporary Resource
Identifier</spanx>, <spanx style='emph'>TeRI</spanx> for short.
This could be expressed by a response option as shown in <xref target="teri-offer"/>.</t>

<figure anchor="teri-offer" title="Option for offering a TeRI in a response"><artwork><![CDATA[
        0
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |    duration   |    TeRI...
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>

<t>The TeRI offer option indicates that the server promises to offer this
resources under the TeRI given for at least the time given as the duration.
Another TeRI offer can be made later to extend the duration.</t>

<t>Once a TeRI for a URI is known (and still within its lifetime), the
client can supply a TeRI instead of a URI in its requests.
The same option format as an offer could be used to allow the client
to indicate how long it believes the TeRI will still be valid (so that
the server can decide when to update the lifetime duration).
TeRIs in requests could be distinguished from URIs e.g. by using a
different option number.</t>

<t><list style='hanging'>
  <t hangText='Proposal:'>
  Add a TeRI option that can be used in CoAP requests and responses.</t>
  <t>Add a way to indicate a TeRI and its duration in a link-value.</t>
  <t>Do not add any form of stateless URI encoding.</t>
  <t hangText='Benefits:'>
  Much higher reduction of message size than any stateless URI encoding
could achieve.</t>
  <t>As the use of TeRIs is entirely optional, minimal complexity nodes
can get by without implementing them.</t>
</list></t>

</section>
</section>
<section anchor="block-wise-transfers" title="Block-wise transfers">

<t>Not all resource representations will fit into a single link layer
packet of a constrained network.  Using fragmentation (either at the
adaptation layer or at the IP layer) to enable the transport of larger
representations is possible up to the maximum size of a UDP datagram,
but the fragmentation/reassembly process loads the lower layers
with conversation state that is better managed in the application
layer.</t>

<t>This section proposes options to enable <spanx style='emph'>block-wise</spanx> access to
resource representations.  The overriding objective is to avoid
creating conversation state at the server for block-wise GET requests.
(It is impossible to fully avoid creating conversation state for
POST/PUT, if the creation/replacement of resources is to be atomic;
where that property is not needed, there is no need to create server
conversation state in this case, either.)  Also, implementation of
these options is intended to be optional. (The details of which parts
of the behavior need to be mandatory to enable that optionality still
are TBD, see below.)</t>

<t>The size of the blocks should not be fixed by the protocol.  On the
other hand, implementation should be as simple as possible.  We
therefore propose a small range of power-of-two block sizes, from 2^4
(16) to 2^11 (2048) bytes.  One of these eight values can be encoded
in three bits (0 for 2^4 to 7 for 2^11 bytes), the <spanx style='verb'>szx</spanx> (size
exponent); the actual block size is then <spanx style='verb'>1 << (szx + 4)</spanx>.</t>

<section anchor="the-block-option" title="The Block Option">

<t>When a representation is larger than can be comfortably transferred in
a single UDP datagram, the Block option can be used to indicate a
block-wise transfer.  Block is a 1-, 2- or 3-byte integer, the four least
significant bits of which indicate the size and whether the current
block-wise transfer is the last block being transferred (M or “more”
bit).  The value divided by sixteen is the number of the block
currently being transferred, starting from zero, i.e., the current
transfer is about the <spanx style='verb'>size</spanx> bytes starting at <spanx style='verb'>blocknr << (szx +
4)</spanx>.  The default value of
the Block option is zero, indicating that the current block is the first
(block number 0) and only (M bit not set) block of the transfer;
however, there is no explicit size implied by this default value.</t>

<figure anchor="block" title="Block option"><artwork><![CDATA[
        0
        0 1 2 3 4 5 6 7
       +-+-+-+-+-+-+-+-+
       |blocknr|M| szx |
       +-+-+-+-+-+-+-+-+

        0                   1
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |        block nr       |M| szx |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

        0                   1                   2
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |                block nr               |M| szx |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>

<t>(Note that the option with the last 4 bits masked out, shifted to the
left by the value of szx, gives the byte position of the block.  The
author is not too sure whether that particularly is a feature.)</t>

<t>The block option is used in one of three roles:</t>

<t><list style='symbols'>
  <t>In the request for a GET, it gives the block number requested and
suggests a block size (block number 0) or echoes the block size of
previous blocks received (block numbers other than 0).</t>
  <t>In the response for a GET or in the request for a PUT or POST, it
describes what block number is contained in the payload, and whether
further blocks are part of that body (M bit).  If the M bit is set,
the size of the payload body in bytes MUST indeed be the power of
two given by the block size.  All blocks for a transaction MUST use
the same block size, except for the last block (M bit not set).</t>
  <t>In the response for a PUT or POST, it indicates what block number is
being acknowledged.  In this case, the M bit is set to indicate that
this response does not carry the final response to the request; this
can occur when the M bit was set in the request and the server
implements PUT/POST atomically (only with the receptin of the last
block).</t>
</list></t>

<t>In all cases, the block number logically extends the transaction ID,
i.e. the same transaction ID can be used for all exchanges for a
block-wise transfer.  (For GET, and for PUT/POST where atomic
semantics are not needed, the requester is free to use different
transactions IDs for each block if desired.)</t>

<t>When a GET is answered with a response carrying a Block option with
the M bit set, the requestor may retrieve additional blocks by sending
requests with a Block option giving the block number desired.  In such
a Block option, the M bit MUST be sent as zero and ignored on
reception.</t>

<t>To influence the block size used in response to a GET request, the
requestor uses the Block option, giving the desired size, a block
number of zero and an M bit of zero.  A server SHOULD use the block
size indicated or a smaller size.  Any further block-wise requests for
blocks beyond the first one MUST indicate the block size used in the
response for the first one.</t>

<t>If the Block option is used by the requestor, all GET requests in a
single transaction MUST use the same size.  The server SHOULD use the
block size indicated in the request option, but the requestor MUST
take note of the actual block size used in the response; the server
MUST ensure that it uses the same block size for all responses in a
transaction (except for the last one with the M bit not set).  [TBD:
decide whether the Block option can only be used in a response if a
Block option was in the request.  Such a minimal block option could be
of length zero, i.e., would occupy just one byte for the type/length
information, but is a bit redundant, so it would
be nice to leave this requirement out, but then every GET requestor has the
burden of having to cope with receiving Block options.]</t>

<t>Block-wise transfers SHOULD be used in conjunction with the Etag option,
unless the representation being exchanged is entirely static (not
changing over time at all, such as in a schema describing a device).
When reassembling the representation from the blocks being exchanged,
the reassembler MUST compare Etag options.  If the Etag options do not
match in a GET transfer, the requestor has the option of attempting to
retrieve fresh values for the blocks it retrieved first.  To minimize
the resulting inefficiency, the server MAY cache the current value of
a representation for an ongoing transaction, but there is no
requirement for the server to establish any state.  The server may
offer a TeRI with the initial block to reduce the size of further
block-wise GET requests; this TeRI MAY be short-lived and specific to
the version of the representation being retrieved (which would in
effect freeze the representation of the resource specifically for the
purposes of this block-wise transfer).</t>

<t>In a PUT or POST transfer, the block option refers to the body in the
request, i.e., there is no way to perform a block-wise retrieval of
the body of the response.  Servers that do need to supply large bodies
in response to PUT/POST SHOULD therefore be employing redirects,
possibly offering a TeRI.</t>

<t>In a PUT or POST transfer that is intended to be implemented in an
atomic fashion at the server, the actual creation/replacement takes
place at the time a block with the M bit unset is received.  If not
all previous blocks are available at the server at this time, the
transfer fails and error code 4__ (TBD) MUST be returned.  The error
code 4__ can also be returned at any time by a server that does not
currently have the resources to store blocks for a block-wise PUT or
POST transfer that it would intend to implement in an atomic fashion.
[TBD: a way for a server to derive the equivalent of an Etag for the
request body, so that when these do not match in a PUT or POST
transfer, the reassembler MUST discard older blocks.  For now, the
transaction ID will have to suffice.]</t>

<t><list style='hanging'>
  <t hangText='Proposal:'>
  Add a Block option that can be used for block-wise transfers.</t>
  <t hangText='Benefits:'>
  Transfers larger than can be accommodated in constrained-network
link-layer packets can be performed in smaller blocks.</t>
  <t>No hard-to-manage conversation state is created at the adaptation
layer or IP layer for fragmentation.</t>
  <t>The transfer of each block is acknowledged, enabling retransmission
if required.</t>
  <t>Both sides have a say in the block size that actually will be used.</t>
</list></t>

</section>
</section>
<section anchor="security-considerations" title="Security Considerations">

<t>TBD.
(Weigh the security implications of application layer block-wise
transfer against those of adaptation-layer or IP-layer fragmentation.
Discuss the implications of TeRIs.
Also: Discuss nodes without clocks.)</t>

</section>

</middle>

<back>

  <references title='Normative References'>



<reference anchor='RFC2119'>

<front>
<title abbrev='RFC Key Words'>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='Scott Bradner'>
<organization>Harvard University</organization>
<address>
<postal>
<street>1350 Mass. Ave.</street>
<street>Cambridge</street>
<street>MA 02138</street></postal>
<phone>- +1 617 495 3864</phone>
<email>sob@harvard.edu</email></address></author>
<date year='1997' month='March' />
<area>General</area>
<keyword>keyword</keyword>
<abstract>
<t>
   In many standards track documents several words are used to signify
   the requirements in the specification.  These words are often
   capitalized.  This document defines these words as they should be
   interpreted in IETF documents.  Authors who follow these guidelines
   should incorporate this phrase near the beginning of their document:

<list>
<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
      RFC 2119.
</t></list></t>
<t>
   Note that the force of these words is modified by the requirement
   level of the document in which they are used.
</t></abstract></front>

<seriesInfo name='BCP' value='14' />
<seriesInfo name='RFC' value='2119' />
<format type='TXT' octets='4723' target='http://www.rfc-editor.org/rfc/rfc2119.txt' />
<format type='HTML' octets='17491' target='http://xml.resource.org/public/rfc/html/rfc2119.html' />
<format type='XML' octets='5777' target='http://xml.resource.org/public/rfc/xml/rfc2119.xml' />
</reference>



<reference anchor='RFC2616'>

<front>
<title abbrev='HTTP/1.1'>Hypertext Transfer Protocol -- HTTP/1.1</title>
<author initials='R.' surname='Fielding' fullname='Roy T. Fielding'>
<organization abbrev='UC Irvine'>Department of Information and Computer Science</organization>
<address>
<postal>
<street>University of California, Irvine</street>
<city>Irvine</city>
<region>CA</region>
<code>92697-3425</code></postal>
<facsimile>+1(949)824-1715</facsimile>
<email>fielding@ics.uci.edu</email></address></author>
<author initials='J.' surname='Gettys' fullname='James Gettys'>
<organization abbrev='Compaq/W3C'>World Wide Web Consortium</organization>
<address>
<postal>
<street>MIT Laboratory for Computer Science, NE43-356</street>
<street>545 Technology Square</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code></postal>
<facsimile>+1(617)258-8682</facsimile>
<email>jg@w3.org</email></address></author>
<author initials='J.' surname='Mogul' fullname='Jeffrey C. Mogul'>
<organization abbrev='Compaq'>Compaq Computer Corporation</organization>
<address>
<postal>
<street>Western Research Laboratory</street>
<street>250 University Avenue</street>
<city>Palo Alto</city>
<region>CA</region>
<code>94305</code></postal>
<email>mogul@wrl.dec.com</email></address></author>
<author initials='H.' surname='Frystyk' fullname='Henrik Frystyk Nielsen'>
<organization abbrev='W3C/MIT'>World Wide Web Consortium</organization>
<address>
<postal>
<street>MIT Laboratory for Computer Science, NE43-356</street>
<street>545 Technology Square</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code></postal>
<facsimile>+1(617)258-8682</facsimile>
<email>frystyk@w3.org</email></address></author>
<author initials='L.' surname='Masinter' fullname='Larry Masinter'>
<organization abbrev='Xerox'>Xerox Corporation</organization>
<address>
<postal>
<street>MIT Laboratory for Computer Science, NE43-356</street>
<street>3333 Coyote Hill Road</street>
<city>Palo Alto</city>
<region>CA</region>
<code>94034</code></postal>
<email>masinter@parc.xerox.com</email></address></author>
<author initials='P.' surname='Leach' fullname='Paul J. Leach'>
<organization abbrev='Microsoft'>Microsoft Corporation</organization>
<address>
<postal>
<street>1 Microsoft Way</street>
<city>Redmond</city>
<region>WA</region>
<code>98052</code></postal>
<email>paulle@microsoft.com</email></address></author>
<author initials='T.' surname='Berners-Lee' fullname='Tim Berners-Lee'>
<organization abbrev='W3C/MIT'>World Wide Web Consortium</organization>
<address>
<postal>
<street>MIT Laboratory for Computer Science, NE43-356</street>
<street>545 Technology Square</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code></postal>
<facsimile>+1(617)258-8682</facsimile>
<email>timbl@w3.org</email></address></author>
<date year='1999' month='June' />
<abstract>
<t>
   The Hypertext Transfer Protocol (HTTP) is an application-level
   protocol for distributed, collaborative, hypermedia information
   systems. It is a generic, stateless, protocol which can be used for
   many tasks beyond its use for hypertext, such as name servers and
   distributed object management systems, through extension of its
   request methods, error codes and headers . A feature of HTTP is
   the typing and negotiation of data representation, allowing systems
   to be built independently of the data being transferred.
</t>
<t>
   HTTP has been in use by the World-Wide Web global information
   initiative since 1990. This specification defines the protocol
   referred to as "HTTP/1.1", and is an update to RFC 2068 .
</t></abstract></front>

<seriesInfo name='RFC' value='2616' />
<format type='TXT' octets='422317' target='http://www.rfc-editor.org/rfc/rfc2616.txt' />
<format type='PS' octets='5529857' target='http://www.rfc-editor.org/rfc/rfc2616.ps' />
<format type='PDF' octets='550558' target='http://www.rfc-editor.org/rfc/rfc2616.pdf' />
<format type='HTML' octets='636125' target='http://xml.resource.org/public/rfc/html/rfc2616.html' />
<format type='XML' octets='493420' target='http://xml.resource.org/public/rfc/xml/rfc2616.xml' />
</reference>



<reference anchor='RFC3986'>

<front>
<title abbrev='URI Generic Syntax'>Uniform Resource Identifier (URI): Generic Syntax</title>
<author initials='T.' surname='Berners-Lee' fullname='Tim Berners-Lee'>
<organization abbrev='W3C/MIT'>World Wide Web Consortium</organization>
<address>
<postal>
<street>Massachusetts Institute of Technology</street>
<street>77 Massachusetts Avenue</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code>
<country>USA</country></postal>
<phone>+1-617-253-5702</phone>
<facsimile>+1-617-258-5999</facsimile>
<email>timbl@w3.org</email>
<uri>http://www.w3.org/People/Berners-Lee/</uri></address></author>
<author initials='R.' surname='Fielding' fullname='Roy T. Fielding'>
<organization abbrev='Day Software'>Day Software</organization>
<address>
<postal>
<street>5251 California Ave., Suite 110</street>
<city>Irvine</city>
<region>CA</region>
<code>92617</code>
<country>USA</country></postal>
<phone>+1-949-679-2960</phone>
<facsimile>+1-949-679-2972</facsimile>
<email>fielding@gbiv.com</email>
<uri>http://roy.gbiv.com/</uri></address></author>
<author initials='L.' surname='Masinter' fullname='Larry Masinter'>
<organization abbrev='Adobe Systems'>Adobe Systems Incorporated</organization>
<address>
<postal>
<street>345 Park Ave</street>
<city>San Jose</city>
<region>CA</region>
<code>95110</code>
<country>USA</country></postal>
<phone>+1-408-536-3024</phone>
<email>LMM@acm.org</email>
<uri>http://larry.masinter.net/</uri></address></author>
<date year='2005' month='January' />
<area>Applications</area>
<keyword>uniform resource identifier</keyword>
<keyword>URI</keyword>
<keyword>URL</keyword>
<keyword>URN</keyword>
<keyword>WWW</keyword>
<keyword>resource</keyword>
<abstract>
<t>
A Uniform Resource Identifier (URI) is a compact sequence of characters
that identifies an abstract or physical resource.  This specification
defines the generic URI syntax and a process for resolving URI references
that might be in relative form, along with guidelines and security
considerations for the use of URIs on the Internet.
The URI syntax defines a grammar that is a superset of all valid URIs,
allowing an implementation to parse the common components of a URI
reference without knowing the scheme-specific requirements of every
possible identifier.  This specification does not define a generative
grammar for URIs; that task is performed by the individual
specifications of each URI scheme.
</t></abstract></front>

<seriesInfo name='STD' value='66' />
<seriesInfo name='RFC' value='3986' />
<format type='TXT' octets='141811' target='http://www.rfc-editor.org/rfc/rfc3986.txt' />
<format type='HTML' octets='213584' target='http://xml.resource.org/public/rfc/html/rfc3986.html' />
<format type='XML' octets='163534' target='http://xml.resource.org/public/rfc/xml/rfc3986.xml' />
</reference>



<reference anchor='I-D.ietf-core-coap'>
<front>
<title>Constrained Application Protocol (CoAP)</title>

<author initials='Z' surname='Shelby' fullname='Zach Shelby'>
    <organization />
</author>

<author initials='B' surname='Frank' fullname='Brian Frank'>
    <organization />
</author>

<author initials='D' surname='Sturek' fullname='Don Sturek'>
    <organization />
</author>

<date month='June' day='7' year='2010' />

<abstract><t>This document specifies the Constrained Application Protocol (CoAP), a specialized transfer protocol for use with constrained networks and nodes for machine-to-machine applications such as smart energy and building automation.  These constrained nodes often have 8-bit microcontrollers with small amounts of ROM and RAM, while networks such as 6LoWPAN often have high packet error rates and typical throughput of 10s of kbit/s.  CoAP provides request/reply and subscribe/notify interaction models between application end-points, supports built-in resource discovery, and includes key web concepts such as URIs and RESTful methods.  CoAP easily translates to HTTP for integration with the web while meeting specialized requirements such as multicast support, very low overhead and simplicity for constrained environments.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-core-coap-00' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-core-coap-00.txt' />
</reference>


  </references>

  <references title='Informative References'>


<reference anchor="REST">
  <front>
    <title>Architectural Styles and the Design of Network-based Software Architectures</title>
    <author fullname="Roy Fielding" initials="R" surname="Fielding">
      <organization>University of California, Irvine</organization>
    </author>
    <date year="2000" />
  </front>
</reference>



<reference anchor='RFC4648'>

<front>
<title>The Base16, Base32, and Base64 Data Encodings</title>
<author initials='S.' surname='Josefsson' fullname='S. Josefsson'>
<organization /></author>
<date year='2006' month='October' />
<abstract>
<t>This document describes the commonly used base 64, base 32, and base 16 encoding schemes.  It also discusses the use of line-feeds in encoded data, use of padding in encoded data, use of non-alphabet characters in encoded data, use of different encoding alphabets, and canonical encodings. [STANDARDS TRACK]</t></abstract></front>

<seriesInfo name='RFC' value='4648' />
<format type='TXT' octets='35491' target='http://www.rfc-editor.org/rfc/rfc4648.txt' />
</reference>



<reference anchor='RFC1951'>

<front>
<title>DEFLATE Compressed Data Format Specification version 1.3</title>
<author initials='P.' surname='Deutsch' fullname='L. Peter Deutsch'>
<organization>Aladdin Enterprises</organization>
<address>
<postal>
<street>203 Santa Margarita Ave.</street>
<city>Menlo Park</city>
<region>CA</region>
<code>94025</code>
<country>US</country></postal>
<phone>+1 415 322 0103</phone>
<facsimile>+1 415 322 1734</facsimile>
<email>ghost@aladdin.com</email></address></author>
<date year='1996' month='May' />
<abstract>
<t>This specification defines a lossless compressed data format that compresses data using a combination of the LZ77 algorithm and Huffman coding, with efficiency comparable to the best currently available general-purpose compression methods.  The data can be produced or consumed, even for an arbitrarily long sequentially presented input data stream, using only an a priori bounded amount of intermediate storage.  The format can be implemented readily in a manner not covered by patents.</t></abstract></front>

<seriesInfo name='RFC' value='1951' />
<format type='TXT' octets='36944' target='http://www.rfc-editor.org/rfc/rfc1951.txt' />
<format type='PS' octets='57408' target='http://www.rfc-editor.org/rfc/rfc1951.ps' />
<format type='PDF' octets='56620' target='http://www.rfc-editor.org/rfc/rfc1951.pdf' />
</reference>

  </references>


</back>
</rfc>


PAFTECH AB 2003-20262026-04-23 10:03:53