Re: sockets APIs extensions for Host Identity Protocol

Chris Newman <Chris.Newman@Sun.COM> Sat, 12 May 2007 01:26 UTC

Return-path: <discuss-bounces@apps.ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1HmgN5-0008Ix-OC; Fri, 11 May 2007 21:26:07 -0400
Received: from discuss by megatron.ietf.org with local (Exim 4.43) id 1HmgN4-0008Is-Es for discuss-confirm+ok@megatron.ietf.org; Fri, 11 May 2007 21:26:06 -0400
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1HmgN4-0008Ik-5N for discuss@apps.ietf.org; Fri, 11 May 2007 21:26:06 -0400
Received: from brmea-mail-4.sun.com ([192.18.98.36]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1HmgN3-0007MT-K2 for discuss@apps.ietf.org; Fri, 11 May 2007 21:26:06 -0400
Received: from fe-amer-09.sun.com ([192.18.108.183]) by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l4C1Q5XL016456 for <discuss@apps.ietf.org>; Sat, 12 May 2007 01:26:05 GMT
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0JHW00D01MF04100@mail-amer.sun.com> (original mail from Chris.Newman@Sun.COM) for discuss@apps.ietf.org; Fri, 11 May 2007 19:26:05 -0600 (MDT)
Received: from [10.1.110.5] by mail-amer.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0JHW0040TMNEZI00@mail-amer.sun.com>; Fri, 11 May 2007 19:26:05 -0600 (MDT)
Date: Fri, 11 May 2007 18:26:05 -0700
From: Chris Newman <Chris.Newman@Sun.COM>
Subject: Re: sockets APIs extensions for Host Identity Protocol
In-reply-to: <46413E7D.5060403@cs.utk.edu>
To: Keith Moore <moore@cs.utk.edu>
Message-id: <992D430ADF32E9A2C10E3B3B@[10.1.110.5]>
MIME-version: 1.0
X-Mailer: Mulberry/3.1.6 (Mac OS X)
Content-type: text/plain; format="flowed"; charset="us-ascii"
Content-transfer-encoding: 7bit
Content-disposition: inline
References: <Pine.SOL.4.64.0705041801060.14418@kekkonen.cs.hut.fi> <31BC7A8C1A51004A84E08DEF@[10.1.110.5]> <46413E7D.5060403@cs.utk.edu>
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 82c9bddb247d9ba4471160a9a865a5f3
Cc: discuss@apps.ietf.org
X-BeenThere: discuss@apps.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: general discussion of application-layer protocols <discuss.apps.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/discuss>, <mailto:discuss-request@apps.ietf.org?subject=unsubscribe>
List-Post: <mailto:discuss@apps.ietf.org>
List-Help: <mailto:discuss-request@apps.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/discuss>, <mailto:discuss-request@apps.ietf.org?subject=subscribe>
Errors-To: discuss-bounces@apps.ietf.org

Very simple APIs that solve the 90-95% case are extremely helpful.  Just 
because we also need APIs for the 5-10% case doesn't mean everyone should be 
forced to use the more complex APIs all the time.

One of the reasons HTTP is used (abused) so much is because the deployed APIs 
are very simple, indeed much simpler than sockets.  I've met programmers who 
will gladly toss stuff over HTTP but consider TCP far too complex to consider 
using.  This is very destructive to the actual complexity and security of the 
system.  But that simply doesn't matter to the vast majority of programmers 
when it saves days/weeks of programming time to use the higher level API.

It's also true that many of the deployed HTTP APIs limit control over HTTP 
headers and methods in such a way that it's impossible to use those APIs and 
follow all the advice in BCP 56.  We've seen similar problems with DNS RR 
labels and DNS APIs.

So API designs need to pay attention to both problems and good APIs often have 
both "simple" and "powerful" entry points.  For example, sockets has read/write 
and recvmsg/sendmsg.  As a programmer, I'd really hate to be forced to use the 
latter for all network I/O.

This is an area where good protocol design and good API design differs.  The 
primary goal of good protocol design is interoperability so infrequently used 
features are bad.  The primary goals of (IETF) API design are ease-of-use to 
aid deployment and transparency to avoid data losing -- those requirements 
often force a good design to have infrequently used features.

                - Chris

Keith Moore wrote on 5/8/07 23:22 -0400:

>
>> If I change my "connectbyname" code again, I will change it once more
>> to use a new OS API that hides all the v4 vs. v6 vs. HIP vs. whatever
>> junk, preferably to something much simpler than the code today.  If
>> such an API isn't produced, I will be very reluctant to change that
>> code no matter how cool HIP might or might not be.
>
> If you can figure out how to write that kind of code in a way that works
> well for a wide variety of applications, with different requirements for
> bandwidth, stability, mobility, etc. all of which affect address
> selection, interface selection, etc., and do all of that efficiently and
> in the absence of routing information from the network, you should
> probably get a prize of some sort.
>
> Granted that programmers want a simple interface, but the more complex
> the network gets, the more apps will be expected to do jobs that were
> supposed to be done at layer 3.
>
> Keith
>
>