[core] Can all responses be instant? (Re: Fwd: New Version Notification for draft-hartke-coap-observe-00)

Carsten Bormann <cabo@tzi.org> Wed, 23 June 2010 16:56 UTC

Return-Path: <cabo@tzi.org>
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 57BB83A6AAC for <core@core3.amsl.com>; Wed, 23 Jun 2010 09:56:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.711
X-Spam-Level:
X-Spam-Status: No, score=-4.711 tagged_above=-999 required=5 tests=[AWL=-0.321, BAYES_20=-0.74, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-4]
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 Nl3DE7O1HK8i for <core@core3.amsl.com>; Wed, 23 Jun 2010 09:55:59 -0700 (PDT)
Received: from informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9:209:3dff:fe00:7136]) by core3.amsl.com (Postfix) with ESMTP id F27713A6AA5 for <core@ietf.org>; Wed, 23 Jun 2010 09:55:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from smtp-fb3.informatik.uni-bremen.de (smtp-fb3.informatik.uni-bremen.de [134.102.224.120]) by informatik.uni-bremen.de (8.14.3/8.14.3) with ESMTP id o5NGtufN019032; Wed, 23 Jun 2010 18:55:56 +0200 (CEST)
Received: from [192.168.217.101] (p5489A34E.dip.t-dialin.net [84.137.163.78]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp-fb3.informatik.uni-bremen.de (Postfix) with ESMTP id 71DAAB9D7; Wed, 23 Jun 2010 18:55:56 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1081)
Content-Type: text/plain; charset="us-ascii"
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <3A0432F2-457D-47B4-A826-9678E8F5DB57@sensinode.com>
Date: Wed, 23 Jun 2010 18:55:54 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <08C9302C-72D4-496B-A7B3-3F37DD1CA759@tzi.org>
References: <20100622203528.0519A28C0D0@core3.amsl.com> <A9654C45-840C-4682-AA1A-9EAF44D81138@tzi.org> <3A0432F2-457D-47B4-A826-9678E8F5DB57@sensinode.com>
To: Zach Shelby <zach@sensinode.com>
X-Mailer: Apple Mail (2.1081)
Cc: core <core@ietf.org>
Subject: [core] Can all responses be instant? (Re: Fwd: New Version Notification for draft-hartke-coap-observe-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: Wed, 23 Jun 2010 16:56:00 -0000

Zach,

that are a number of very good questions.

Let's start discussing this one:

> - I am not sure about the implications of allowing a delayed GET and PUT response on implementations. Currently in coap-00 if an end-point doesn't make use of subscribe/notify it doesn't have to implement code to wait for asynchronous notifications. For example it might simply make a request, open a temporary UDP socket waiting for the response, and then close that and go to sleep. Well, I guess if it gets an intermediate response code it would know to stay awake waiting for the response. Is this an efficient way of using energy in a constrained network though? What if a client doesn't want a delayed response?

Right now, CoAP is silent on how much time a server has to answer a request.

Certainly, that time will never be zero.

Can we live with limiting this time to < RESPONSE_TIMEOUT hard?

If yes, everything gets simpler.
If not, there is always the alternative not to do an inversion of control; in that case, the server would reply with a "please wait and try again", maybe including a duration that gives the estimated time until an answer, and the client would simply repeat asking at its convenience.
(Of course, the server could simply remain silent, prompting retransmissions, but this means that we limit the time to RESPONSE_TIMEOUT * MAX_RETRANSMIT, assuming no errors, and we increase the likelihood of a transfer failing just because of lost packets.)

On the other hand, if we do have a "notify" style packet, there is very little stopping us from implementing an "I'll give it to you later" reply (the "ACK" packet in Figure 1 of coap-observe).  A client that doesn't want to wait can simply treat that as a failure.

As usual, we should probably err on the side of simplicity, but only after having discussed whether we are hitting Einstein's "but no simpler".

Gruesse, Carsten