Re: [core] http observe unification

<L.Wood@surrey.ac.uk> Thu, 28 October 2010 15:27 UTC

Return-Path: <L.Wood@surrey.ac.uk>
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 D1CEF3A67E7 for <core@core3.amsl.com>; Thu, 28 Oct 2010 08:27:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.581
X-Spam-Level:
X-Spam-Status: No, score=-6.581 tagged_above=-999 required=5 tests=[AWL=0.017, BAYES_00=-2.599, HTML_MESSAGE=0.001, 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 Jnl19I6VtR7R for <core@core3.amsl.com>; Thu, 28 Oct 2010 08:27:48 -0700 (PDT)
Received: from mail82.messagelabs.com (mail82.messagelabs.com [195.245.231.67]) by core3.amsl.com (Postfix) with ESMTP id CE5623A677C for <core@ietf.org>; Thu, 28 Oct 2010 08:27:46 -0700 (PDT)
X-VirusChecked: Checked
X-Env-Sender: L.Wood@surrey.ac.uk
X-Msg-Ref: server-4.tower-82.messagelabs.com!1288279777!39707806!1
X-StarScan-Version: 6.2.9; banners=-,-,-
X-Originating-IP: [131.227.200.31]
Received: (qmail 8286 invoked from network); 28 Oct 2010 15:29:37 -0000
Received: from unknown (HELO EXHT011P.surrey.ac.uk) (131.227.200.31) by server-4.tower-82.messagelabs.com with AES128-SHA encrypted SMTP; 28 Oct 2010 15:29:37 -0000
Received: from EXMB01CMS.surrey.ac.uk ([169.254.1.245]) by EXHT011P.surrey.ac.uk ([131.227.200.31]) with mapi; Thu, 28 Oct 2010 16:29:37 +0100
From: L.Wood@surrey.ac.uk
To: pab@peoplepowerco.com, cabo@tzi.org
Date: Thu, 28 Oct 2010 16:29:39 +0100
Thread-Topic: [core] http observe unification
Thread-Index: Act2rHJ5/nB+CQoKR6WfE4+w6g6yZgAB9mYQ
Message-ID: <FD7B10366AE3794AB1EC5DE97A93A3730C2D79C0E4@EXMB01CMS.surrey.ac.uk>
References: <AANLkTikcog5b3hB-bzyY2eBSQOiq2MVSVM09uj12tSo=@mail.gmail.com> <71B894AE-7AD9-4DBC-AE21-00353894D8F0@tzi.org> <AANLkTikwtdvsffUeg3czGY-yiJUNsmuNjt53YVzZ=Dws@mail.gmail.com>
In-Reply-To: <AANLkTikwtdvsffUeg3czGY-yiJUNsmuNjt53YVzZ=Dws@mail.gmail.com>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US, en-GB
Content-Type: multipart/alternative; boundary="_000_FD7B10366AE3794AB1EC5DE97A93A3730C2D79C0E4EXMB01CMSsurr_"
MIME-Version: 1.0
Cc: core@ietf.org
Subject: Re: [core] http observe unification
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, 28 Oct 2010 15:27:55 -0000

the hybi workgroup has been in something of a mess - there's been a dustup over whether it's a W3C (WHATWG) or IETF workgroup, drafts have been stalled, editors have been changed.

I would not recommend basing anything here on hybi's output.

________________________________
From: core-bounces@ietf.org [mailto:core-bounces@ietf.org] On Behalf Of Peter Bigot
Sent: 28 October 2010 15:29
To: Carsten Bormann
Cc: core
Subject: Re: [core] http observe unification

I think the IETF activity I was looking for was "HyBi", a term I didn't recognize; thanks for the pointer.  From its Wiki page:

The HyBi<http://trac.tools.ietf.org/bof/trac/wiki/HyBi> activity of the IETF coordinates work in the IETF related to several proposals for bidirectional, "long poll", and "reverse" HTTP: mechanisms where the connection is still initiated by the client but communication is initiated by the server.

This clearly states the problem for HTTP, which involves concepts of connection and client/server communication.  CoAP does not have a concept of "connection", and the client/server distinction is, in my opinion, a residue of the assumption in REST that a resource is owned by a single entity (the server) and interaction with it is always initiated by a different entity (the client).  It is not necessarily appropriate for all M2M communication, where an explicit peer-to-peer model has significant value.

There are a variety of approaches.  I'm still collecting base information, then will drop below the working group reflector to coordinate with Kerry, Klaus, Angelo, and others who have expressed a specific interest in the problem, with the intent of coming up with a set of use cases and common terminology that can be used to evaluate these approaches.  I have other responsibilities which may delay visible progress until next week, but we'll still aim to have something for discussion in Beijing.

Peter

On Thu, Oct 28, 2010 at 8:56 AM, Carsten Bormann <cabo@tzi.org<mailto:cabo@tzi.org>> wrote:
Hi Peter,

I can't speak for Cullen (who is fast asleep right now, I hope), but you pressed what I think is a similar button with me, so I'll give you my interpretation.

> In the telecon yesterday, you objected to my proposal that the solution to the observation problem be left to designers of specific systems.  It sounded like you felt a reference document describing alternative approaches that applications might take would not be adequate.  Could you elaborate a little more here on what you believe CoAP must provide, and in what timeframe?

Most of us are used to take existing protocols and kludge together a solution for a problem using these protocols.  (One could argue that much of the Internet works that way.)  However, all these kludges have limitations and complexities caused by their kludginess.  When designing something new, it is important to separate in one's mind the desire to reuse a neat kludge that once worked for us, from a *good* way to solve the problem.  (As usual, this is balanced by the need to avoid NIH -- component reuse is a good idea, and a fit rarely has to be perfect.)

So, back to the specific problem, I think what would be interesting to see is a spec on resource observation that is developed well enough that these issues can be evaluated.  HTTP has shown us that there is no end of kludges that can be invented to solve related problems -- we have to find out which approaches are good for CoAP (where goodness includes, but is *not* limited to, ease of building boxes that map to HTTP).

In the end we want to have *the* way to handle asynchronous communication in CoAP, or -- if we need to have multiple ways -- one each for a well-defined area of application.  "Let the market decide" often just means people play games whose kludge goes into which widely used product first -- in the end we all lose.

(To avoid misunderstandings -- I'm not saying that, say, every solution that treats a subscription as a REST resource in their own right is a kludge, I'm just feeling that way when the main motivation appears to be that one would need to do this in HTTP.  CoAP is not HTTP.  On the other hand there may be a need to do both the lightweight and the heavyweight solution if each of them does not solve all the problems the other does and the unsolved problems are important enough to warrant a second solution.)

> I understood you to say that some IETF working group was nearly complete with a proposed standard way to implement observation in HTTP.  Is that the Httpbis group?  To which of their documents were you referring?  draft-loreto-http-bidirectional is somewhat relevant (wrt streaming responses).

I think that comment was with respect to websockets.  Websockets is interesting as it is not an application protocol in the strict sense, but a way to securely (for some definition of security) derive a (minimally structured) transport to a browser from a URI.  The other half, how notifications should look like and how they interact with resource state, is outside the scope of websockets.  CoAP does not need websockets, because we already know how to send packets in our constrained networks, and there is no browser security to take care of.

Of course, there is half a dozen other hybi proposals that are more semantically rich.
http://trac.tools.ietf.org/bof/trac/wiki/HyBi#Proposals lists about half of them.

> The clearly relevant one is draft-roach-sip-http-subscribe, but that's based on SIP event notification.  Were we to take that approach, it might be best to define a CoAP-like protocol "csip", rather than integrate that functionality directly into CoAP.  On first glance, it appears this would be at least as much work as defining CoAP has been.  It would, though, give us a solution to observation, notification, and group communication that is compatible with the HTTP family of protocols, so is certainly worth considering.

I think this draft is a good source of ideas on how to combine HTTP resources with other protocols.  I don't see a need to draw in yet another protocol, though.

Gruesse, Carsten