Re: [core] Fwd: New Version Notification for draft-shelby-core-coap-00

David Ryan <oobles@gmail.com> Thu, 18 March 2010 23:01 UTC

Return-Path: <oobles@gmail.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 E216D3A69F7; Thu, 18 Mar 2010 16:01:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.02
X-Spam-Level:
X-Spam-Status: No, score=0.02 tagged_above=-999 required=5 tests=[BAYES_05=-1.11, 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 t4pFNnLPDNh2; Thu, 18 Mar 2010 16:01:27 -0700 (PDT)
Received: from mail-iw0-f186.google.com (mail-iw0-f186.google.com [209.85.223.186]) by core3.amsl.com (Postfix) with ESMTP id 1334B3A6952; Thu, 18 Mar 2010 16:01:27 -0700 (PDT)
Received: by iwn16 with SMTP id 16so1004112iwn.17 for <multiple recipients>; Thu, 18 Mar 2010 16:01:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Fn1/30Xra8nlr/sGKUG/7XuHbn+mQuusH6MqP+G3Dls=; b=Hgc62pMiTEB+/b9fOWpy/D2+GhI38i69g45qdp/g6RgbeNnS1OzFurxYmSUaUpGgeQ unqC4GUdF/yo1K7Tu1xRNegg81SCZ/LD2kaRJvhfxxZIGddb4KfMrtpQs0Rv4AFwXVep 6eypp/wSc2MALtOQEgjQ5nn1gAc99BINgt+pg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=qmBPW4dtX38Ujh/NxjBInsBmWRmJHFjfMWyUX3pHR4/a6Tj7cd1VYioFetWLkVzlki AkSgIrSe1vBgKC5ftirxFxTLrDXB8lnOuPLbuiSvWzZWPwdRdjZvJ2ZL/MH1yGnta+TO MOrhWDj8xuKAsqW+cbthe302ChcRcUM77vbkE=
MIME-Version: 1.0
Received: by 10.231.160.149 with SMTP id n21mr979902ibx.93.1268953295625; Thu, 18 Mar 2010 16:01:35 -0700 (PDT)
In-Reply-To: <489285BF-8B4B-45E2-B0F9-625CCC45FA21@sensinode.com>
References: <20100301212435.28BDD28C1B5@core3.amsl.com> <489285BF-8B4B-45E2-B0F9-625CCC45FA21@sensinode.com>
Date: Fri, 19 Mar 2010 10:01:35 +1100
Message-ID: <7f996c491003181601q6ccbc89tdaffbe4ec12e2e10@mail.gmail.com>
From: David Ryan <oobles@gmail.com>
To: Zach Shelby <zach@sensinode.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: core@ietf.org, 6LoWAPP <6lowapp@ietf.org>
Subject: Re: [core] Fwd: New Version Notification for draft-shelby-core-coap-00
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 23:01:29 -0000

Hi All,

I sent the following questions and feedback to Brian and Zach who
suggested I forward this to the list for further discussion.  I won't
be at the meeting in Anaheim next week, so here's my input.

First off, a question regarding the compression of the protocol.
You've managed to compress the header into 4 bytes.  Obviously the
size of the header is going to be important.  In the priority list of
features, is this the most important?  Would another byte or two hurt?

I notice between Chopan and COAP you've dropped the magic number
headers.  This must have been a conscious decision. I would have liked
to see a one byte magic value to identify the packet or TCP stream.
This would at least give a server a chance to throw away the request
if it receives a bad message.

In regard to version.  Two bits only leaves four possible versions.
Extending this to 4 bits would at least extend this to 16 versions.
This goes back to the original point regarding size of header.

Back in 2008 I did a thought experiment on a binary REST based
protocol.  Details available at:

http://blog.livemedia.com.au/search?updated-min=2008-01-01T00%3A00%3A00%2B11%3A00&updated-max=2009-01-01T00%3A00%3A00%2B11%3A00&max-results=7

Many of the elements are not applicable to COAP, but there might be
one or two features I developed which could be worth discussing.

One element of this through experiment was to include a "slotsAvailable"
in the response.  As the "transactionid" field allows multiple
requests to be sent to a single recipient, the "slotsAvailable" in the
response allows a client to limit the number of requests sent.  I'd
suggest 4 bits in the response.  If the server can handle more than 16
requests it can return 16 in all responses.  A small device might
return 1 at all times.

Another concept I thought about was to have a bit field for protocol
features.  This may not be applicable in this case, however, something
to put on the back burner.  The idea is that a small device might only
respond to a limited set of features (or options).  A bit field can be
used to identify in the request which features are being used and in
the response what features the server can handle.

I was also surprised that the protocol doesn't include the URI path in
the main part of the header.  I must admit I'm still trying to
understand how the index based approach to URI paths will work in your
proposal.

I tried taking your proposal and combined it with a few of the above
changes and came up with the following:

Packet
  preamble/magic  (1 byte)

  version (4 bits)
  features (4 bits)

  response (1 bit)
  options (1 bit)
  asynchronous (1 bit)
  locationType (1 bit)     (0 URI location field enabled, 1 location
specified in options)
  method/slots (4 bits)  (method type in request/slots available in response)

  transactionId (16 bits)

  location (URI location if locationType 0)

  options length (8 bits - length)
  ... options ...

  payload length (variable length int)
  ...payload data...


The base header in this case is 5 bytes instead of the 4 bytes.

I also suggested that the number of options is at the start of the
options list.  This allows the server to quickly decide if the packet
can be handled and all the option list can be processed.  In a
constrained device only a selected number of options could be
processed.  This removes the need for the 0 byte end of options byte.

I have also used a variable length integer for the payload.  This is
to allow the protocol to move to TCP with larger packets.

Regards,
David.


On Tue, Mar 2, 2010 at 8:30 AM, Zach Shelby <zach@sensinode.com> wrote:
> http://www.ietf.org/id/draft-shelby-core-coap-00.txt
>
> Here is a very early draft of a CoAP protocol specification based on the requirements and initial ideas formulated in draft-shelby-core-coap-req-00 and the previous work by Brian in draft-frank-6lowapp-chopan. Looking forward to lots of good discussion around CoAP, and as you can see from all the TODOs and TBDs - lots of WG stuff to do here!
>
> At the same time I'd like to request a time-slot to present this in Anaheim.
>
> Zach
>
> Begin forwarded message:
>
>> From: IETF I-D Submission Tool <idsubmission@ietf.org>
>> Date: March 1, 2010 23:24:35 GMT+02:00
>> To: zach@sensinode.com
>> Cc: brian.tridium@gmail.com
>> Subject: New Version Notification for draft-shelby-core-coap-00
>>
>>
>> A new version of I-D, draft-shelby-core-coap-00.txt has been successfuly submitted by Zach Shelby and posted to the IETF repository.
>>
>> Filename:      draft-shelby-core-coap
>> Revision:      00
>> Title:                 Constrained Application Protocol (CoAP)
>> Creation_date:         2010-03-01
>> WG ID:                 Independent Submission
>> Number_of_pages: 17
>>
>> Abstract:
>> This document specifies the Constrained Application Protocol (CoAP),
>> a RESTful protocol for use with constrained networks and nodes.  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.
>>
>>
>>
>> The IETF Secretariat.
>>
>>
>
> --
> http://www.sensinode.com
> http://zachshelby.org - My blog "On the Internet of Things"
> http://6lowpan.net - New book - "6LoWPAN: The Wireless Embedded Internet"
> Mobile: +358 40 7796297
>
> Zach Shelby
> Head of Research
> Sensinode Ltd.
> Kidekuja 2
> 88610 Vuokatti, FINLAND
>
> This e-mail and all attached material are confidential and may contain legally privileged information. If you are not the intended recipient, please contact the sender and delete the e-mail from your system without producing, distributing or retaining copies thereof.
>
>
>
>
> _______________________________________________
> core mailing list
> core@ietf.org
> https://www.ietf.org/mailman/listinfo/core
>