[core] Comments on draft-shelby-core-coap-req-00.txt

Alexey Melnikov <alexey.melnikov@isode.com> Thu, 18 March 2010 22:58 UTC

Return-Path: <alexey.melnikov@isode.com>
X-Original-To: core@core3.amsl.com
Delivered-To: core@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6CE0F3A6B93 for <core@core3.amsl.com>; Thu, 18 Mar 2010 15:58:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.131
X-Spam-Level: *
X-Spam-Status: No, score=1.131 tagged_above=-999 required=5 tests=[BAYES_50=0.001, DNS_FROM_OPENWHOIS=1.13]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t3TvY-4IoXzf for <core@core3.amsl.com>; Thu, 18 Mar 2010 15:58:43 -0700 (PDT)
Received: from rufus.isode.com (rufus.isode.com [62.3.217.251]) by core3.amsl.com (Postfix) with ESMTP id 4C1D23A6BB6 for <core@ietf.org>; Thu, 18 Mar 2010 15:58:43 -0700 (PDT)
Received: from [192.168.1.128] (c-98-234-189-190.hsd1.ca.comcast.net [98.234.189.190]) by rufus.isode.com (submission channel) via TCP with ESMTPA id <S6KwLQAu7qjE@rufus.isode.com>; Thu, 18 Mar 2010 22:58:54 +0000
Message-ID: <4BA2B030.4030709@isode.com>
Date: Thu, 18 Mar 2010 22:58:56 +0000
From: Alexey Melnikov <alexey.melnikov@isode.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090303 SeaMonkey/1.1.15
To: core@ietf.org
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Subject: [core] Comments on draft-shelby-core-coap-req-00.txt
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/core>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Mar 2010 22:58:44 -0000

   REQ13:  Internet media type and transfer encoding type support.
           [I-D.sturek-6lowapp-smartenergy], [I-D.gold-6lowapp-sensei]

Why is support for multiple Content-Transfer-Encodings is needed? Any 
C-T-E other than 8bit increases size of messages
and cost of implementation, which are 2 other requirements mentioned in 
the document.

2.2.  Basic Messages

   It is assumed that basic Request and Response messages will be
   required by the CoAP protocol.  This also provides a natural mapping
   to HTTP (See Section 2.10) and the response may be useful as an
   acknowledgement in UDP reliability (See Section 2.8.1).  It can be
   considered that CoAP methods are different kinds of Request messages,
   therefore a separate Request message is not needed.

I don't understand the last sentence.

2.4.  Content-type encoding

   In order to support hetergenous uses, it is important that CoAP is
   transparent to the use of different application payloads.  In order
   for the application process receiving a packet to properly parse a
   payload, its content-type and encoding should be explicitly known
   from the header (as e.g. with HTTP).  The use of typical binary
   encodings for XML is discussed in [I-D.shelby-6lowapp-encoding],
   which includes recommendations for header indication.  The draft
   recommends the indication of at least 10 Internet media types (MIME)
   [RFC2046] and 2 content transfer encodings.

As above, I am not convinced that you need to support multiple C-T-E in 
COAP.

   It is obvious that string names of Internet media types [RFC2046] are
   not appropriate for use in the CoAP header.

Well, and URIs are Ok why?

   But then how to make
   this small yet extensible?  One possible solution is to simply assign
   codes to a small subset of common MIME and content transfer encoding
   types and have IANA maintain that.  A field of 16-bits should be
   sufficient for encoding both media and content transfer encoding
   types.  For extending some types, magic numbers can also be used from
   the beginning of the payload (as defined in associated Internet media
   type RFCs).  This could be indicated by a header value something like
   "See magic numbers".

Hmm. The list of MIME types is small and can be easily encoded. It 
hardly ever changes.
I suppose subtypes can be enumerated.
If this is going to be an extension to the existing MIME media type 
registry, I suggest discussing this with Ned Freed and John Klensin.

2.5.  URLs

   The Universal Resource Locator (URL) [RFC3986] is an important
   feature of the REST architecture, the relative part of the URL
   indicates which resource on the server is being manipulated.  It is
   surely useful for CoAP to support string URLs, which requires a
   variable length-value field.  Although URLs can be designed for
   compactness, this still often results in 10s of bytes of overhead.
   The encoding of the URL string also needs to be considered, as this
   is becoming increasingly complex.  It is recommended that only US-
   ASCII is supported in URL strings for CoAP as defined in [RFC3986],

Basically you are saying that you want URIs, but not IRIs.
And RFC 3986 only describes URIs.

   or even a stricter subset as URL parsing

I recommend against putting further restrictions to URIs. URI/IRI/URN 
are already complex, this will make the UR* world even more complicated.
I also don't think that this WG is the right place to define 
restrictions on URIs.

   is complex and may result in security problems on constrained devices.

This is true. This might mean that URIs is not what you want. But I 
would be afraid to recommend that you design something new. This task 
itself might take years.

Regards,
Alexey