[hybi] ws and bwtp thoughts

"Thomson, Martin" <Martin.Thomson@andrew.com> Wed, 21 October 2009 02:20 UTC

Return-Path: <Martin.Thomson@andrew.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 5EA613A6937 for <hybi@core3.amsl.com>; Tue, 20 Oct 2009 19:20:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.524
X-Spam-Level:
X-Spam-Status: No, score=-2.524 tagged_above=-999 required=5 tests=[AWL=0.075, BAYES_00=-2.599]
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 ALYgL0UV684G for <hybi@core3.amsl.com>; Tue, 20 Oct 2009 19:20:39 -0700 (PDT)
Received: from csmailgw1.commscope.com (csmailgw1.commscope.com [198.135.207.243]) by core3.amsl.com (Postfix) with ESMTP id 64B1C3A68ED for <hybi@ietf.org>; Tue, 20 Oct 2009 19:20:39 -0700 (PDT)
Received: from [10.86.20.103] ([10.86.20.103]:39762 "EHLO ACDCE7HC2.commscope.com") by csmailgw1.commscope.com with ESMTP id S4639363AbZJUCUr (ORCPT <rfc822; hybi@ietf.org>); Tue, 20 Oct 2009 21:20:47 -0500
Received: from SISPE7HC2.commscope.com (10.97.4.13) by ACDCE7HC2.commscope.com (10.86.20.103) with Microsoft SMTP Server (TLS) id 8.1.393.1; Tue, 20 Oct 2009 21:20:47 -0500
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC2.commscope.com ([fe80::58c3:2447:f977:57c3%10]) with mapi; Wed, 21 Oct 2009 10:20:44 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: "hybi@ietf.org" <hybi@ietf.org>
Date: Wed, 21 Oct 2009 10:21:08 +0800
Thread-Topic: ws and bwtp thoughts
Thread-Index: AcpR9SX7t6OrTeQ/T2+ytdLVkuGLFg==
Message-ID: <8B0A9FCBB9832F43971E38010638454F0F1EA1D4@SISPE7MB1.commscope.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw1.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
Subject: [hybi] ws and bwtp thoughts
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 21 Oct 2009 02:20:40 -0000

I've been following the discussions on WS and BWTP (awful name, BTW) with some interest.

The differences are many, but aside from a few they probably make little difference from a technical standpoint.

My current thoughts, from the easy ones to the hard ones.

==Upgrade from HTTP

It seems to me that this is something that could be addressed independent of either submission.  I get the impression that the differences between camps aren't so fervent.

Maybe if this was made a different document, discussing the implications on (and of) intermediaries, discussing the security model that it enables, setting guidelines for its use, then any other submission need only register a protocol tag.

==Readability

The savings in space (and performance) gained by having a binary header (ws) are outweighed by the cost in constructing and reading messages.  Debugging a binary protocol is less easy than a textual one.

==MIME

There's potential gain from using all the existing base here.  Take a leaf from BEEP and set a default that means that basic implementations don't need to be bothered by the existence of the option.  Thus, at most you have maybe four characters (\r\n\r\n) separating protocol header from body.

MIME also provides a channel for extension.

==Channels

This seems a rather fundamental difference.  I was in two minds on this issue until I realized something.  Channels are not the issue - it's doing multiple things with the one session.  Channels are just one way of addressing the problem.  Delegating any responsibility to a higher layer is another way.

HTTP doesn't have channels.  There's no multiplexing.  If you need multiplexing, you open a new connection.  We're somehow managing.  

What does HTTP provide in this regard that (f'rinstance) TCP does not?  Messages are addressed to specific destinations.  So I have a (half-baked) suggestion: Use MIME and allow requests to be addressed.

A server has addressable entities.  Each of those entities might be the source of events.  A server might identify an originating resource in a MIME "From:" header.  Each of those entities might also the target of an event.  A client might identify a target resource with a "To:" header.

The initial concern here is that a client does not have an identity, nor does it conceivably have addressable resources.  If an application wishes to establish the idea that multiple entities exist at a client, then "From:" and "To:" headers can also be used in the reverse.

Now, for those applications that don't care, make addressing optional.  Don't force them to do anything.  After all, for those who truly care, there is an address established on the server end when the upgrade is made (unless the upgrade is made with a resource URI of "*"); and we can assume a default ("*"?) on the client.

==URI

When dealing with this same problem in Geopriv, we flip-flopped on the issue a number of times.  Whether or not a URI is necessary is a trade-off that can be happily made in either direction.

BWTP doesn't define a URI scheme.  It relies on a client having contextual information/prior knowledge to determine that a given URI actually points to a BWTP session.  Sure, there are those who choose to assign semantics to URIs, but that doesn't help a generic processor, like a browser make any sensible decision on how to use it.

To some extent, whether a URI is useful depends on whether there is any benefit to be had from establishing a session without some sort of pre-existing context.  How necessary is the contextual information specific to the application?

Based on this sort of analysis, the choices made in BWTP and WS are opposite to what their protocol definitions facilitate.  WS relies on application context to a greater extent, where BWTP allows for the use of meta-data.  It would seem that BWTP is better equipped to providing any contextual information through MIME headers; therefore, BWTP is more suited to having its own scheme.  Because WS doesn't provide any in-protocol information to a generic processor that would allow it to make use of a WS connection without prior knowledge, a URI scheme is of less benefit for WS.

Of course, having a unique namespace for identifiers has its own value.

==Martin