Re: [6lowapp] HTTP and SIP

Adam Dunkels <adam@sics.se> Sat, 10 October 2009 22:06 UTC

Return-Path: <adam@sics.se>
X-Original-To: 6lowapp@core3.amsl.com
Delivered-To: 6lowapp@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 403DF3A694F for <6lowapp@core3.amsl.com>; Sat, 10 Oct 2009 15:06:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.249
X-Spam-Level:
X-Spam-Status: No, score=-2.249 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_SE=0.35]
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 gOBkwBN5z9Ns for <6lowapp@core3.amsl.com>; Sat, 10 Oct 2009 15:06:46 -0700 (PDT)
Received: from letter.sics.se (letter.sics.se [193.10.64.6]) by core3.amsl.com (Postfix) with ESMTP id 1E4253A6946 for <6lowapp@ietf.org>; Sat, 10 Oct 2009 15:06:45 -0700 (PDT)
Received: from [10.1.1.254] (unknown [10.1.1.254]) by letter.sics.se (Postfix) with ESMTP id 879464001C; Sun, 11 Oct 2009 00:08:32 +0200 (CEST)
Message-ID: <4AD105DC.3070407@sics.se>
Date: Sun, 11 Oct 2009 00:08:28 +0200
From: Adam Dunkels <adam@sics.se>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: Shidan <shidan@gmail.com>
References: <429b380e0910101030q25f1ad7fge7157c2e04b5d530@mail.gmail.com>
In-Reply-To: <429b380e0910101030q25f1ad7fge7157c2e04b5d530@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: 6lowapp@ietf.org
Subject: Re: [6lowapp] HTTP and SIP
X-BeenThere: 6lowapp@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Application protocols for constrained nodes and networks <6lowapp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/6lowapp>, <mailto:6lowapp-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/6lowapp>
List-Post: <mailto:6lowapp@ietf.org>
List-Help: <mailto:6lowapp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/6lowapp>, <mailto:6lowapp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Oct 2009 22:06:47 -0000

Shidan wrote:
> "request-response protocols like HTTP may require battery-operated, 
> mostly sleeping nodes to be listening for requests much more frequently 
> than their application processing requirements alone would need them to 
> wake up."
>  
> "In addition, some of the applications may require optimizations in 
> terms of bandwidth usage; for example, the usual data formats (both 
> headers and body) are perceived to be too chatty for the 50-60 byte 
> payloads possible in LoWPANs.  Their interpretation and generation may 
> require too much code for the 8-bit and 16-bit processors dominating 
> LoWPAN nodes."
>  
> None of these points seem evident to me. 

I very much agree with this. By so quickly dismissing the opportunities 
with existing protocols such as HTTP and SIP, this group may miss 
reaching widespread adoption of its protocols.

Both these arguments were frequently used in the past against IP for 
resource-constrained systems, yet today we take IP for granted for these 
systems despite the overheads of IP. We need to a pay price for 
interoperability and flexibility, but we think it is worth it.

FWIW, we've recently been working with REST web services 
(REST/HTTP/TCP/IP) over 802.15.4 with a low-power duty-cycling radio 
protocol (X-MAC) for Contiki. The implementation of the application 
layers (REST/HTTP) has roughly a 5kb code footprint. The performance is 
not bad: a full HTTP/TCP/IP REST transaction with sensor data in XML 
format is completed in roughly 0.5 seconds over a one-hop radio link and 
in less than 2 seconds over a four-hop radio network:

http://www.sics.se/~adam/yazar09efficient.pdf

Note that this is without any optimizations at the REST/HTTP/TCP/IP 
layers. Full HTTP headers are sent from the curl client, reducing the 
overall performance. Full XML is sent from the sensors. Thus there is 
plenty of opportunity to improve this without moving away from the 
HTTP/TCP/IP framework. For example, as we show in the above paper, there 
are significant savings in using conditional HTTP GETs when data have 
not changed between subsequent requests.

Like Shidan, I am not saying that we necessarily must use full-fledged 
REST/HTTP/TCP/IP or SIP for everything in our resource-constrained 
networks. But we mustn't so quickly rule out existing mechanisms just 
because of their perceived overhead. Interoperability and flexibility 
are very important properties, often more important than bit-level 
optimizations.

/adam
-- 
Adam Dunkels <adam@sics.se>se>, +46707731614
http://twitter.com/adunk | http://www.sics.se/~adam/