
From ian@hixie.ch  Thu Jun  4 17:34:02 2009
Return-Path: <ian@hixie.ch>
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 839543A6859 for <hybi@core3.amsl.com>; Thu,  4 Jun 2009 17:34:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.442
X-Spam-Level: 
X-Spam-Status: No, score=-6.442 tagged_above=-999 required=5 tests=[AWL=-4.158, BAYES_00=-2.599, SARE_MILLIONSOF=0.315]
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 2pfRTIry1cRL for <hybi@core3.amsl.com>; Thu,  4 Jun 2009 17:34:01 -0700 (PDT)
Received: from looneymail-a1.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 84B423A684E for <hybi@ietf.org>; Thu,  4 Jun 2009 17:33:36 -0700 (PDT)
Received: from hixie.dreamhostps.com (hixie.dreamhost.com [208.113.210.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a1.g.dreamhost.com (Postfix) with ESMTP id 50AE815D795; Thu,  4 Jun 2009 17:33:39 -0700 (PDT)
Date: Fri, 5 Jun 2009 00:33:39 +0000 (UTC)
From: Ian Hickson <ian@hixie.ch>
To: Greg Wilkins <gregw@webtide.com>
In-Reply-To: <49F663DF.7030300@webtide.com>
Message-ID: <Pine.LNX.4.62.0906050011290.1648@hixie.dreamhostps.com>
References: <1cb725390904131712k292a4860pbd078bb251d3855b@mail.gmail.com> <Pine.LNX.4.62.0904140031040.10339@hixie.dreamhostps.com> <1cb725390904131752u5842c039wb3d75602c479fa45@mail.gmail.com> <Pine.LNX.4.62.0904140053050.10339@hixie.dreamhostps.com> <1cb725390904131814o6040a8d3t637069a344d561bd@mail.gmail.com> <Pine.LNX.4.62.0904240546100.10370@hixie.dreamhostps.com> <E51D5B15BFDEFD448F90BDD17D41CFF105AD1ADC@AHQEX1.andrew.com> <Pine.LNX.4.62.0904240805380.12381@hixie.dreamhostps.com> <E51D5B15BFDEFD448F90BDD17D41CFF105AD1E13@AHQEX1.andrew.com> <Pine.LNX.4.62.0904270033570.12381@hixie.dreamhostps.com> <20090427150429.GE4885@shareable.org> <Pine.LNX.4.62.0904271812110.12381@hixie.dreamhostps.com> <49F663DF.7030300@webtide.com>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Cc: hybi@ietf.org
Subject: [hybi] How to define the WebSocket protocol (Was: Is there a traffic jam?)
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: Fri, 05 Jun 2009 00:34:02 -0000

On Tue, 28 Apr 2009, Greg Wilkins wrote:
> Ian Hickson wrote:
> > I'm happy to add more complexity (so long as it is justified) to the 
> > client implementation, with the caveat that it must not also increase 
> > the complexity of the server-side implementations.
> 
> Would it be sufficient to allow optional support of complex features. So 
> a server could implement a either a simple core of websocket or a richer 
> more complex feature set?

No, that's just increasing the complexity but saying it's optional.


> Also, you have argued against additional frame-type that could better 
> support complex behaviour on the grounds that the base frame types can 
> carry that complex protocol with assumptions.  If a mime-encapsulating 
> frame type is not worth a dedicated frame-type byte, then what kinds of 
> extensions do you see additional frame-type being defined for?

I've mentioned some before; streaming video and JSON data are two possible 
examples. Basically anything that requires API-level changes.


> > The client component has to deal with any server, including 
> > non-conforming servers sending back garbage, future servers that 
> > support an extended version of the protocol, etc. Server components 
> > only have to deal with the output possible from their own scripts 
> > driving a conforming implementation of the API. We can leverage that 
> > asymmetry.
> 
> I do not think this is generally true.
> 
> Server that will implement the websocket protocol are more than likely 
> going to be done by entirely different sets of developers than those 
> that write the javascript content that is served from them.

Sure, but they still have to have a common protocol which they are able to 
decide together. If they have a bug, they get to decide which side fixes 
it. This is different than the browser vendor vs server/script authors 
case, where the two groups aren't in any way related.


> More over, the javascript served will probably be from 2, 3 or even more 
> distinct sets of developers as frameworks, mashups and other such things 
> will bring together the work of many into a single page.

In the more advanced cases, maybe. The more advanced the case, the mroe 
professional the programmers involved, the less the complexity matters. We 
have to take into account the non-professional case too, though.


> There is also the likely hood of more and more cross-site support and 
> websockets will have to support cross site in some way, so a server may 
> receive connections from code it didn't actually serve.

But it still gets to define the protocol that it serves.


> Furthermore, intermediary proxy's etc. may alter what is sent/received. 
> Even if the initial proxies/firewalls don't, I'm sure somebody will 
> develop some smart websocket aware proxy that does some
> 
> So Server components also have to deal wit non-conforming clients 
> sending back garbage etc. etc.

Sure, but how it reacts to them doesn't have to be particularly carefully 
designed, since the clients will still be limited. This is still an 
asymmetry compared to the client side case, where there will be thousands 
or millions of different servers, developed completely independently and 
not tested with those clients.

However, at this point I'm not really sure I follow what change you are 
arguing for, so I'm not sure what to tell you.


> > This is why currently the spec for the client side defines the entire 
> > protocol (including binary frames which might be sent by servers in 
> > the future), but the spec for the server side only defines the rules 
> > required for handling content sent by the current client API.
> 
> I think the specification should entirely define the wire protocol 
> without any assumptions about who/what/where is implementing the client 
> or the server.

I disagree. It is imperative that clients handle future servers in a 
predictable and consistent way, but it is not imperative that servers 
handle future clients in a predictable and consistent way, since they will 
only receive data in a form they don't expect if the clients are violating 
a contract with the server.

However, I have made the server-side definition of the protocol more 
well-defined so that while the rules are still asymetric, they are 
better-defined for the server side.


> If we wait for non-js-in-browser clients before fully specifying the 
> server side of the protocol, then we have a chicken and the egg problem.

How so? Could you elaborate on this?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

From gregw@webtide.com  Fri Jun  5 20:25:09 2009
Return-Path: <gregw@webtide.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 E7D0C3A6A66 for <hybi@core3.amsl.com>; Fri,  5 Jun 2009 20:25:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.284
X-Spam-Level: 
X-Spam-Status: No, score=-2.284 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, SARE_MILLIONSOF=0.315]
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 sxrQrmDYOv7m for <hybi@core3.amsl.com>; Fri,  5 Jun 2009 20:25:07 -0700 (PDT)
Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.236]) by core3.amsl.com (Postfix) with ESMTP id 34D6B3A68F4 for <hybi@ietf.org>; Fri,  5 Jun 2009 20:25:06 -0700 (PDT)
Received: by rv-out-0506.google.com with SMTP id k40so506862rvb.5 for <hybi@ietf.org>; Fri, 05 Jun 2009 20:25:06 -0700 (PDT)
Received: by 10.141.115.20 with SMTP id s20mr3501087rvm.93.1244258706762; Fri, 05 Jun 2009 20:25:06 -0700 (PDT)
Received: from ?192.168.1.55? ([216.9.106.99]) by mx.google.com with ESMTPS id 30sm924050pzk.72.2009.06.05.20.25.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Jun 2009 20:25:06 -0700 (PDT)
Message-ID: <4A29E18E.1060005@webtide.com>
Date: Fri, 05 Jun 2009 20:25:02 -0700
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: Ian Hickson <ian@hixie.ch>
References: <1cb725390904131712k292a4860pbd078bb251d3855b@mail.gmail.com> <Pine.LNX.4.62.0904140031040.10339@hixie.dreamhostps.com> <1cb725390904131752u5842c039wb3d75602c479fa45@mail.gmail.com> <Pine.LNX.4.62.0904140053050.10339@hixie.dreamhostps.com> <1cb725390904131814o6040a8d3t637069a344d561bd@mail.gmail.com> <Pine.LNX.4.62.0904240546100.10370@hixie.dreamhostps.com> <E51D5B15BFDEFD448F90BDD17D41CFF105AD1ADC@AHQEX1.andrew.com> <Pine.LNX.4.62.0904240805380.12381@hixie.dreamhostps.com> <E51D5B15BFDEFD448F90BDD17D41CFF105AD1E13@AHQEX1.andrew.com> <Pine.LNX.4.62.0904270033570.12381@hixie.dreamhostps.com> <20090427150429.GE4885@shareable.org> <Pine.LNX.4.62.0904271812110.12381@hixie.dreamhostps.com> <49F663DF.7030300@webtide.com> <Pine.LNX.4.62.0906050011290.1648@hixie.dreamhostps.com>
In-Reply-To: <Pine.LNX.4.62.0906050011290.1648@hixie.dreamhostps.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] How to define the WebSocket protocol (Was: Is there a traffic jam?)
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: Sat, 06 Jun 2009 03:25:09 -0000

Ian,

>> Also, you have argued against additional frame-type that could better 
>> support complex behaviour on the grounds that the base frame types can 
>> carry that complex protocol with assumptions.  If a mime-encapsulating 
>> frame type is not worth a dedicated frame-type byte, then what kinds of 
>> extensions do you see additional frame-type being defined for?
> 
> I've mentioned some before; streaming video and JSON data are two possible 
> examples. Basically anything that requires API-level changes.

Why doesn't Mime encapsulated data fit that definition?
It would require API changes so that meta data associated with
the data could be sent and received?


>> More over, the javascript served will probably be from 2, 3 or even more 
>> distinct sets of developers as frameworks, mashups and other such things 
>> will bring together the work of many into a single page.
> 
> In the more advanced cases, maybe. The more advanced the case, the mroe 
> professional the programmers involved, the less the complexity matters. We 
> have to take into account the non-professional case too, though.

So why not support optionally richer (but more complex) features
that better support these mashups, but are well within the capabilities
of these superior programmers?

However, I fundamentally reject the premise that a protocol design should be
affected by the quality of programmer who may code it.   What other
equivalent protocol (HTTP, FTP, SS7, TCP, etc) has been deliberate made
less capable so that amateur programmers may be able to attempt implementations?


>> So Server components also have to deal wit non-conforming clients 
>> sending back garbage etc. etc.
> 
> Sure, but how it reacts to them doesn't have to be particularly carefully 
> designed, since the clients will still be limited. This is still an 
> asymmetry compared to the client side case, where there will be thousands 
> or millions of different servers, developed completely independently and 
> not tested with those clients.
> 
> However, at this point I'm not really sure I follow what change you are 
> arguing for, so I'm not sure what to tell you.

Hmmmm

I have made several clear proposals, which I do feel have been rejected
with little attempt to understand the use-cases that motivate them.

So this stage I don't think it is worthwhile us continuing to bat this
back and forth, as you appear very resistant to consider any changes at
all to your proposal.  Which is a pity as I don't think it is that far
away from something that could accommodate a wider range of concerns.

Instead, I propose to prepare an alternate draft for a WebSocket
transport protocol proposal that will:

 + support the current Websocket API proposal
 + support mime encapsulated data, but with an assumption of UTF-8 datagrams
 + support multiple URLs/Origins per connection
 + be specified in a style more in accordance with common
   protocol practise of being strict in what is generated and
   forgiving in what is accepted.

If anybody would like to collaborate on this alternative draft please
contact me off-list.


>> If we wait for non-js-in-browser clients before fully specifying the 
>> server side of the protocol, then we have a chicken and the egg problem.
> 
> How so? Could you elaborate on this?

Because if the protocol does not support non-js-in-browser clients, then
they will not be implemented because the the protocol does not support
them.  Thus if we wait for them to be implemented before defining the
protocol to support them, we will wait forever.


regards



From ian@hixie.ch  Fri Jun  5 20:37:21 2009
Return-Path: <ian@hixie.ch>
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 94C8B3A6C6E for <hybi@core3.amsl.com>; Fri,  5 Jun 2009 20:37:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.56
X-Spam-Level: 
X-Spam-Status: No, score=-5.56 tagged_above=-999 required=5 tests=[AWL=-2.961,  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 vGBJZmnRkNBT for <hybi@core3.amsl.com>; Fri,  5 Jun 2009 20:37:20 -0700 (PDT)
Received: from looneymail-a1.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 6ED6A3A6BF3 for <hybi@ietf.org>; Fri,  5 Jun 2009 20:37:20 -0700 (PDT)
Received: from hixie.dreamhostps.com (hixie.dreamhost.com [208.113.210.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a1.g.dreamhost.com (Postfix) with ESMTP id CC24315D80A; Fri,  5 Jun 2009 20:37:23 -0700 (PDT)
Date: Sat, 6 Jun 2009 03:37:23 +0000 (UTC)
From: Ian Hickson <ian@hixie.ch>
To: Greg Wilkins <gregw@webtide.com>
In-Reply-To: <4A29E18E.1060005@webtide.com>
Message-ID: <Pine.LNX.4.62.0906060328330.16244@hixie.dreamhostps.com>
References: <1cb725390904131712k292a4860pbd078bb251d3855b@mail.gmail.com> <Pine.LNX.4.62.0904140031040.10339@hixie.dreamhostps.com> <1cb725390904131752u5842c039wb3d75602c479fa45@mail.gmail.com> <Pine.LNX.4.62.0904140053050.10339@hixie.dreamhostps.com> <1cb725390904131814o6040a8d3t637069a344d561bd@mail.gmail.com> <Pine.LNX.4.62.0904240546100.10370@hixie.dreamhostps.com> <E51D5B15BFDEFD448F90BDD17D41CFF105AD1ADC@AHQEX1.andrew.com> <Pine.LNX.4.62.0904240805380.12381@hixie.dreamhostps.com> <E51D5B15BFDEFD448F90BDD17D41CFF105AD1E13@AHQEX1.andrew.com> <Pine.LNX.4.62.0904270033570.12381@hixie.dreamhostps.com> <20090427150429.GE4885@shareable.org> <Pine.LNX.4.62.0904271812110.12381@hixie.dreamhostps.com> <49F663DF.7030300@webtide.com> <Pine.LNX.4.62.0906050011290.1648@hixie.dreamhostps.com> <4A29E18E.1060005@webtide.com>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Cc: hybi@ietf.org
Subject: Re: [hybi] How to define the WebSocket protocol (Was: Is there a traffic jam?)
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: Sat, 06 Jun 2009 03:37:21 -0000

On Fri, 5 Jun 2009, Greg Wilkins wrote:
> >>
> >> Also, you have argued against additional frame-type that could better 
> >> support complex behaviour on the grounds that the base frame types 
> >> can carry that complex protocol with assumptions.  If a 
> >> mime-encapsulating frame type is not worth a dedicated frame-type 
> >> byte, then what kinds of extensions do you see additional frame-type 
> >> being defined for?
> > 
> > I've mentioned some before; streaming video and JSON data are two 
> > possible examples. Basically anything that requires API-level changes.
> 
> Why doesn't Mime encapsulated data fit that definition? It would require 
> API changes so that meta data associated with the data could be sent and 
> received?

Because, unlike with, say, video streaming, there's really no need to have 
the browsers support this natively -- it can be layered on top of the 
existing API. One of the core principles I've been following in developing 
HTML5 and other APIs for the Web application platform is to make the core 
platform be as light as possible, supporting just the basics, and then let 
library authors layer on top of this what they need.


> >> More over, the javascript served will probably be from 2, 3 or even 
> >> more distinct sets of developers as frameworks, mashups and other 
> >> such things will bring together the work of many into a single page.
> > 
> > In the more advanced cases, maybe. The more advanced the case, the 
> > more professional the programmers involved, the less the complexity 
> > matters. We have to take into account the non-professional case too, 
> > though.
>
> So why not support optionally richer (but more complex) features that 
> better support these mashups, but are well within the capabilities of 
> these superior programmers?

Because in practice there's no such thing as optional features on the Web. 
We'd end up forcing these features on everyone.


> However, I fundamentally reject the premise that a protocol design 
> should be affected by the quality of programmer who may code it.  What 
> other equivalent protocol (HTTP, FTP, SS7, TCP, etc) has been deliberate 
> made less capable so that amateur programmers may be able to attempt 
> implementations?

I don't think the Internet so far have been particularly successful in 
terms of being used by amateurs. HTML and its APIs is an example of a 
language that _has_ been delibrerately made accessible to amateur 
programmers, with an insane level of success. WebSocket is much more like 
HTML than TCP in this sense.


> I have made several clear proposals, which I do feel have been rejected 
> with little attempt to understand the use-cases that motivate them.

I'm sorry you don't feel that I've made an attempt to understand them; I 
thought I had.


> >> If we wait for non-js-in-browser clients before fully specifying the 
> >> server side of the protocol, then we have a chicken and the egg 
> >> problem.
> > 
> > How so? Could you elaborate on this?
> 
> Because if the protocol does not support non-js-in-browser clients, then 
> they will not be implemented because the the protocol does not support 
> them.  Thus if we wait for them to be implemented before defining the 
> protocol to support them, we will wait forever.

I don't understand why the server side of this protocol is affected by 
whether we get non-JS-in-browser clients.

In any case, as far as I can tell the server side of the protocol _is_ 
fully specified. The server-side requirements aren't identical to the 
client-side requirements, but that's pretty normal. I don't really 
understand the problem here. Servers aren't ever going to receive packets 
they don't recognise in between packets they do; a packet a server doesn't 
recognise is a fatal error. This is unlike clients, who might well exist 
long after the protocol is upgraded, and thus have to be able to deal with 
any number of weird future servers gracefully.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

From gregw@webtide.com  Fri Jun  5 20:45:21 2009
Return-Path: <gregw@webtide.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 B61FD3A6A10 for <hybi@core3.amsl.com>; Fri,  5 Jun 2009 20:45:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.442
X-Spam-Level: 
X-Spam-Status: No, score=-2.442 tagged_above=-999 required=5 tests=[AWL=0.158,  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 OErI73VRLQVb for <hybi@core3.amsl.com>; Fri,  5 Jun 2009 20:45:21 -0700 (PDT)
Received: from mail-pz0-f177.google.com (mail-pz0-f177.google.com [209.85.222.177]) by core3.amsl.com (Postfix) with ESMTP id 1477A3A684D for <hybi@ietf.org>; Fri,  5 Jun 2009 20:45:20 -0700 (PDT)
Received: by pzk7 with SMTP id 7so84160pzk.29 for <hybi@ietf.org>; Fri, 05 Jun 2009 20:45:22 -0700 (PDT)
Received: by 10.114.46.6 with SMTP id t6mr6626835wat.17.1244259918375; Fri, 05 Jun 2009 20:45:18 -0700 (PDT)
Received: from ?192.168.1.55? ([216.9.106.99]) by mx.google.com with ESMTPS id 26sm853655pzk.48.2009.06.05.20.45.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Jun 2009 20:45:17 -0700 (PDT)
Message-ID: <4A29E64A.7000003@webtide.com>
Date: Fri, 05 Jun 2009 20:45:14 -0700
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: Ian Hickson <ian@hixie.ch>
References: <1cb725390904131712k292a4860pbd078bb251d3855b@mail.gmail.com> <Pine.LNX.4.62.0904140031040.10339@hixie.dreamhostps.com> <1cb725390904131752u5842c039wb3d75602c479fa45@mail.gmail.com> <Pine.LNX.4.62.0904140053050.10339@hixie.dreamhostps.com> <1cb725390904131814o6040a8d3t637069a344d561bd@mail.gmail.com> <Pine.LNX.4.62.0904240546100.10370@hixie.dreamhostps.com> <E51D5B15BFDEFD448F90BDD17D41CFF105AD1ADC@AHQEX1.andrew.com> <Pine.LNX.4.62.0904240805380.12381@hixie.dreamhostps.com> <E51D5B15BFDEFD448F90BDD17D41CFF105AD1E13@AHQEX1.andrew.com> <Pine.LNX.4.62.0904270033570.12381@hixie.dreamhostps.com> <20090427150429.GE4885@shareable.org> <Pine.LNX.4.62.0904271812110.12381@hixie.dreamhostps.com> <49F663DF.7030300@webtide.com> <Pine.LNX.4.62.0906050011290.1648@hixie.dreamhostps.com> <4A29E18E.1060005@webtide.com> <Pine.LNX.4.62.0906060328330.16244@hixie.dreamhostps.com>
In-Reply-To: <Pine.LNX.4.62.0906060328330.16244@hixie.dreamhostps.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] How to define the WebSocket protocol (Was: Is there a traffic jam?)
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: Sat, 06 Jun 2009 03:45:21 -0000

Ian Hickson wrote:
> I'm sorry you don't feel that I've made an attempt to understand them; I 
> thought I had.

Well for whatever reason, we are misunderstanding each other.

Perhaps the more precise language of a concrete proposal will
break this cycle of misunderstanding.

I'll try to have something ready in a week or two.

regards

From pieterh@gmail.com  Sat Jun  6 02:05:53 2009
Return-Path: <pieterh@gmail.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 B50543A69DB for <hybi@core3.amsl.com>; Sat,  6 Jun 2009 02:05:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level: 
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 hFO49xpMs29G for <hybi@core3.amsl.com>; Sat,  6 Jun 2009 02:05:53 -0700 (PDT)
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by core3.amsl.com (Postfix) with ESMTP id BF7E43A6AD6 for <hybi@ietf.org>; Sat,  6 Jun 2009 02:05:52 -0700 (PDT)
Received: by fg-out-1718.google.com with SMTP id d23so323978fga.18 for <hybi@ietf.org>; Sat, 06 Jun 2009 02:05:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=IG816jL8SeFchhqw1Sa2aXYJsNf/6l4GGxCMQkZwrYk=; b=wBY6hf8a5yE3Jwiar7J8aUqEocCARAk1Dvc2M9k4b5/KInEX8OsNS8KSqcODoP0Aep 7LkbmkAt6d8yAgujh7wpW+CQNn59e/qGlyeh98UEBD1mA2bvUiieMXqTlLOCsyM3t3ch 2Ngv34Lu3oDo47RI6CnsrWB7evwPRLC+5OK0I=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=gMlACRC52CpkqeYrtXvII5VeC14g0IyUZ4vbr/GQxJH0buUEyIRRzq9DT3tF2VUdU1 Fu+JTAID/CYYYkngTsjVvqb4nY3nCTnt/M3JupPe5BE0qU6RoHwfEIoHOdBDYEllmFsT cX7Nrv8sQI6cKDVAEHaRSwKP/AcOCBpbskI2s=
MIME-Version: 1.0
Sender: pieterh@gmail.com
Received: by 10.86.33.9 with SMTP id g9mr4800558fgg.66.1244279153078; Sat, 06  Jun 2009 02:05:53 -0700 (PDT)
In-Reply-To: <4A29E64A.7000003@webtide.com>
References: <1cb725390904131712k292a4860pbd078bb251d3855b@mail.gmail.com>  <E51D5B15BFDEFD448F90BDD17D41CFF105AD1E13@AHQEX1.andrew.com>  <Pine.LNX.4.62.0904270033570.12381@hixie.dreamhostps.com>  <20090427150429.GE4885@shareable.org> <Pine.LNX.4.62.0904271812110.12381@hixie.dreamhostps.com>  <49F663DF.7030300@webtide.com> <Pine.LNX.4.62.0906050011290.1648@hixie.dreamhostps.com>  <4A29E18E.1060005@webtide.com> <Pine.LNX.4.62.0906060328330.16244@hixie.dreamhostps.com>  <4A29E64A.7000003@webtide.com>
From: Pieter Hintjens <ph@imatix.com>
Date: Sat, 6 Jun 2009 11:05:33 +0200
X-Google-Sender-Auth: 3a08b26d26fb27c6
Message-ID: <5821ea240906060205i1f598f54r10c92ba847959c79@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] How to define the WebSocket protocol (Was: Is there a traffic jam?)
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: Sat, 06 Jun 2009 09:05:53 -0000

On Sat, Jun 6, 2009 at 5:45 AM, Greg Wilkins<gregw@webtide.com> wrote:

>> I'm sorry you don't feel that I've made an attempt to understand them; I
>> thought I had.
>
> Well for whatever reason, we are misunderstanding each other.

Don't worry, guys.  I don't understand either of you. :-)

-Pieter Hintjens

From gregw@webtide.com  Wed Jun 10 02:24:06 2009
Return-Path: <gregw@webtide.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 6165B3A67DB for <hybi@core3.amsl.com>; Wed, 10 Jun 2009 02:24:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[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 A91TevfsOnFJ for <hybi@core3.amsl.com>; Wed, 10 Jun 2009 02:24:03 -0700 (PDT)
Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.182]) by core3.amsl.com (Postfix) with ESMTP id F38773A67A4 for <hybi@ietf.org>; Wed, 10 Jun 2009 02:24:02 -0700 (PDT)
Received: by wa-out-1112.google.com with SMTP id l35so199106waf.5 for <hybi@ietf.org>; Wed, 10 Jun 2009 02:24:07 -0700 (PDT)
Received: by 10.114.159.5 with SMTP id h5mr1786375wae.201.1244625847785; Wed, 10 Jun 2009 02:24:07 -0700 (PDT)
Received: from ?10.10.1.16? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 17sm7068973pxi.162.2009.06.10.02.24.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Jun 2009 02:24:06 -0700 (PDT)
Message-ID: <4A2F7BB2.5000105@webtide.com>
Date: Wed, 10 Jun 2009 19:24:02 +1000
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: hybi@ietf.org
Content-Type: multipart/mixed; boundary="------------000809000107080105040200"
Subject: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 10 Jun 2009 09:24:06 -0000

This is a multi-part message in MIME format.
--------------000809000107080105040200
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

All,

Attached in a very very early draft of an alternative proposal for a
transfer protocol for HTML5 WebSockets.  For lack of a better
name (and not wanting to coopt the hybi name), I've called it

  BWTP - Bidirection Web Transfer Protocol

I wont explain the protocol here, as hopefully the proposal
document does that sufficiently well.

But I will explain why I think this proposal (or something
approximately similar) is superior to the current Websocket
protocol proposal:

 + The protocol is very much an IETF style application
   protocol.  In fact it is just RFC2616 with anything
   non bidirectional ripped out.
   It is not trying to be a revolution in web protocols,
   but simply to solve the problems at hand.

 + The protocol document is written very much in IETF style.
   In fact it is just RFC2616 with anything non bidirectional
   ripped out.   BNF is used to specify the protocol and the
   principal of "be strict in what you generate and forgiving
   in what your parse" is adhered to.

 + Because of it's similarity to HTTP, it is intended that
   existing HTTP clients, servers and intermediaries will be able
   to be minimally updated to support this protocol.
   This will not require entirely new protocol libraries
   to be developed.   Existing development and analysis
   tools will also be able to be easily updated, plus
   the protocol is mostly human readable.

 + It supports full mime encapsulated payloads, but has
   a default mechanism so that most values only need to
   be specified once per connection if they do not change.

   The minimal overhead per message is 11 bytes, which is
   a little more than the websocket proposal, but is hardly
   significant.

 + There is no formal channel mechanism like BEEP has,
   but each message may be to/from a different URI if
   need be.  This makes multiplexing easy to support.

 + There is no formal segmentation mechanism, but
   Content-Ranges are supported so that large content
   cna be sent in smaller bits if desired.

 + The protocol recognizes that intermediaries (proxies) may
   wish to be an active party on a bi direction connection.
   For example, this proposal allows an intermediary to
   initiate and orderly lossless close of the connection.
   I'm sure innovative proxy applications will be
   developed over time, just as they have been for HTTP.

 + it well supports the current HTML WebSocket API
   but is also flexible and extensible so that non
   browser clients may use it and future APIs will
   not need protocol changes.

I'd really appreciate any feedback, co-authors, review,
editing etc.   I don't consider anything in this proposal
to be fixed and all is open to change.

I have the draft in Google Docs and am happy to add
collaborators (there are a few already (who should add
themselves to the authors/acknowlegements)).


cheers

--------------000809000107080105040200
Content-Type: text/plain;
 name="bwtp.txt"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
 filename="bwtp.txt"

                                                     Greg Wilkins

        Bidirectional Web Transfer Protocol -- BWTP/1.0

Status of this Memo

   This document is written by somebody who knows nothing of IETF
   procedures.  It is desperately in need of co-authors and review.
   It is intended to be an alternative proposal for the
   transport protocol for the WebSocket API from HTML 5.

   This document is heavily based on RFC2616 and borrow structure,
   ideas and text from that document.

   currently the formatting is all manual and the section numbering
   has been kept similar to RFC2616

Copyright Notice

   Copyright (C) The Internet Society (2009).  All Rights Reserved.

Abstract

   The Bidirectional Web Transfer Protocol (HTTP) is an application-level
   protocol that can be used to upgrade an RFC2616 HTTP connection 
   to a bidirectional channel capable of exchanging messages.





Table of Contents

   TBD


1 Introduction

1.1 Purpose

   The Hypertext Transfer Protocol (HTTP) is an application-level
   protocol for distributed, collaborative, hypermedia information
   systems. HTTP has been in use by the World-Wide Web global
   information initiative since 1990, but it is intrinsically a
   request/response protocol and cannot well service the growing
   use-case for data to be pushed from a server to a client.

   The Bidirectional Web Transfer Protocol (BWTP) is an application-level
   protocol that can be used to upgrade a HTTP/1.1 connection to
   be able to exchange bidirectional MIME-like messages, 
   containing metainformation about the data transferred.
   
   Messages are passed in a format similar to that used by HTTP/1.1
   as defined by RFC2616. It is intended that implementations
   of HTTP clients, servers and intermediaries will be able to
   be minimally updated in order to support BWTP.

1.2 Requirements

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [34].

   An implementation is not compliant if it fails to satisfy one or more
   of the MUST or REQUIRED level requirements for the protocols it
   implements. An implementation that satisfies all the MUST or REQUIRED
   level and all the SHOULD level requirements for its protocols is said
   to be "unconditionally compliant"; one that satisfies all the MUST
   level requirements but not all the SHOULD level requirements for its
   protocols is said to be "conditionally compliant."

1.3 Terminology

   This specification uses a number of terms to refer to the roles
   played by participants in, and objects of, the HTTP or BWTP communication.

   connection
      A transport layer virtual circuit established between two programs
      for the purpose of communication.

   message
      The basic unit of BWTP communication, consisting of a structured
      sequence of octets matching the syntax defined in section 4 and
      transmitted via the connection.

   request
      An HTTP request message, as defined in section 5 of RFC 2616.

   response
      An HTTP response message, as defined in section 6 of RFC 2616.

   resource
      A network data object or service that can be identified by a URI,
      as defined in section 3.2. Resources may be available in multiple
      representations (e.g. multiple languages, data formats, size, and
      resolutions) or vary in other ways.

   client
      A program that establishes connections for the purpose of sending
      requests.

   user agent
      The client which initiates a connection. These are often browsers,
      editors, spiders (web-traversing robots), or other end user tools.

   server
      An application program that accepts connections.
      Any given program may
      be capable of being both a client and a server; our use of these
      terms refers only to the role being performed by the program for a
      particular connection, rather than to the program's capabilities
      in general. Likewise, any server may act as an origin server,
      proxy, gateway, or tunnel, switching behavior based on the nature
      of each message.

   origin server
      The server on which a given resource resides or is to be created.

   proxy
      An intermediary program which acts as both a server and a client
      for the purpose of making requests on behalf of other clients.
      Requests are serviced internally or by passing them on, with
      possible translation, to other servers. A proxy MUST implement
      both the client and server requirements of this specification. A
      "transparent proxy" is a proxy that does not modify the request or
      response beyond what is required for proxy authentication and
      identification. A "non-transparent proxy" is a proxy that modifies
      the request or response in order to provide some added service to
      the user agent, such as group annotation services, media type
      transformation, protocol reduction, or anonymity filtering. Except
      where either transparent or non-transparent behavior is explicitly
      stated, the HTTP proxy requirements apply to both types of
      proxies.

   gateway
      A server which acts as an intermediary for some other server.
      Unlike a proxy, a gateway receives requests as if it were the
      origin server for the requested resource; the requesting client
      may not be aware that it is communicating with a gateway.

   tunnel
      An intermediary program which is acting as a blind relay between
      two connections. Once active, a tunnel is not considered a party
      to the HTTP communication, though the tunnel may have been
      initiated by an HTTP request. The tunnel ceases to exist when both
      ends of the relayed connections are closed.

   upstream/downstream
      Upstream and downstream describe the flow of a message: all
      messages flow from upstream to downstream.

   inbound/outbound
      Inbound and outbound refer to the request and response paths for
      messages: "inbound" means "travelling toward the origin server",
      and "outbound" means "travelling toward the user agent"

1.4 Overall Operation

   The BWTP protocol is a HTTP upgrade protocol. A clients a HTTP
   upgrade request to the server in order to establish a BWTP connection.
   After successful upgrade, the BWTP connection is a bidirectional 
   stream of MIME-like messages. There is no relationship between 
   inbound and outbound messages.

   The upgrade request and response may define meta data defaults
   for all messages on a BWTP connection, such as content-type,
   character-set, content-encoding, Location and Origin. 
   Individual messages my override any or all of these
   defaults as well as provide additional meta-data that does not
   have defaults.

   BWTP communication is initiated by a user agent and consists of
   an upgrade request to be applied to a resource on some origin server. 
   In the simplest case, this may be accomplished via a single connection (v)
   between the user agent (UA) and the origin server (O).

       UA -------------------v------------------- O
          upgrade request ----------------------»
          «----------------- 101 upgrade response
          inbound messages ---------------------»
          «-------------------- outbound messages

   Inbound and outbound messages may be sent simultaneously.

   A more complicated situation occurs when one or more intermediaries
   are present in the request/response chain. There are three common
   forms of intermediary: proxy, gateway, and tunnel. A proxy is a
   forwarding agent, receiving a message for a URI in its absolute form,
   rewriting all or part of the message, and forwarding the reformatted
   request toward the server identified by the URI. A gateway is a
   receiving agent, acting as a layer above some other server(s) and, if
   necessary, translating the requests to the underlying server's
   protocol. A tunnel acts as a relay point between two connections
   without changing the messages; tunnels are used when the
   communication needs to pass through an intermediary (such as a
   firewall) even when the intermediary cannot understand the contents
   of the messages.

       UA -----v----- A -----v----- B -----v----- C -----v----- O
          upgrade request ------------------------------------»
          «------------------------------- 101 upgrade response
          inbound messages -----------------------------------»
          «---------------------------------- outbound messages

   The figure above shows three intermediaries (A, B, and C) between the
   user agent and origin server.  All intermediaries must accept 
   the initial upgrade request and pass it onwards towards the 
   origin server. If any intermediary does not understand the 
   upgrade request, the BWTP connection will not be established.
   
   A message that travels the whole chain will pass through four 
   separate connections.

   This distinction is important because some  BWTP communication 
   options may apply only to the connection with the nearest, non-tunnel
   neighbour, only to the end-points of the chain, or to all connections
   along the chain. 
   
   Although the diagram is linear, each participant may
   be engaged in multiple, simultaneous communications. For example, B
   may be receiving requests from many clients other than A, and/or
   forwarding requests to servers other than C, at the same time that it
   is handling A's request.

   Any party to the communication which is not acting as a tunnel may
   inject messages into either the inbound or outbound stream.
   
   The following illustrates if B has injects both an inbound
   and an outbound message:

       UA -----v----- A -----v----- B -----v----- C -----v----- O
          upgrade request ------------------------------------»
          «------------------------------- 101 upgrade response
          inbound messages -----------------------------------»
          «---------------------------------- outbound message»
          «-------outbound message--|--inbound message -------»
          inbound messages -----------------------------------»
          «---------------------------------- outbound messages


   BWTP communication usually takes place over TCP/IP connections. The
   default port is TCP 80 [19], but other ports can be used. This does
   not preclude BWTP from being implemented on top of any other protocol
   on the Internet, or on other networks. BWTP only presumes a HTTP 
   connection can be established over a reliable transport;
   any protocol that provides such guarantees can be used.


2 Notational Conventions and Generic Grammar

2.1 Augmented BNF

   All of the mechanisms specified in this document are described in
   both prose and an augmented Backus-Naur Form (BNF) as defined by
   section 2.1 of RFC 2616.
   
   Implementers will need to be familiar with the
   notation in order to understand this specification.

2.2 Basic Rules

   The Basic Rules as defined by section 2.2 of RFC 2616 are used
   throughout this specification to describe basic parsing constructs.
   The US-ASCII coded character set is defined by ANSI X3.4-1986 [21].

3 Protocol Parameters

3.1 BWTP Version

   BWTP uses a "«major».«minor»" numbering scheme to indicate versions
   of the protocol. The protocol versioning policy is intended to allow
   the sender to indicate the format of a message and its capacity for
   understanding further BWTP communication, rather than the features
   obtained via that communication. No change is made to the version
   number for the addition of message components which do not affect
   communication behavior or which only add to extensible field values.
   The «minor» number is incremented when the changes made to the
   protocol add features which do not change the general message parsing
   algorithm, but which may add to the message semantics and imply
   additional capabilities of the sender. The «major» number is
   incremented when the format of a message within the protocol is
   changed. See RFC 2145 [36] for a fuller explanation.

   All messages on a BWTP connection will be of the same version
   that is negotiated with the upgrade request and response that
   establishes the BWTP connection:

       BWTP-Version   = "BWTP" "/" 1*DIGIT "." 1*DIGIT

   Note that the major and minor numbers MUST be treated as separate
   integers and that each MAY be incremented higher than a single digit.
   Thus, BWTP/2.4 is a lower version than BWTP/2.13, which in turn is
   lower than BWTP/12.3. Leading zeros MUST be ignored by recipients and
   MUST NOT be sent.

   The BWTP version of a connection is the highest BWTP version for
   which all intermediaries and the agent and origin server can handle.


3.2 Uniform Resource Identifiers

   URIs as defined by 3.2 of RFC2616 are used to identify BWTP
   resources.


3.4 Character Sets

   BWTP uses the same definition of the term "character set" as that
   described in section 3.4 of RFC2616.


3.4.1 Missing Charset

   If not otherwise specified, a character set of UTF-8 may be assumed.
   

3.5 Content Codings

   The content codings defined by section 3.5 of RFC2616 and 
   registered with the Internet Assigned Numbers Authority (IANA)
   MAY be applied to a BWTP message.

3.6 Transfer Codings

   HTTP-like transfer codings MUST NOT be applied to BWTP 
   connections or messages. Specifically the chunked transfer
   encoding is not supported by BWTP; Range limited messages
   should be sent in situations where chunked transfer is
   desirable.

3.7 Media Types

   HTTP uses Internet Media Types [17] in the Content-Type 
   header field in order to provide open and extensible data typing 
   and type negotiation. The media-type is defined in section
   3.7 of RFC2616 as:

       media-type     = type "/" subtype *( ";" parameter )
       type           = token
       subtype        = token

3.12 Range Units

   BWTP allows a message to carry only a part of an identified resource.
   BWTP uses range units in the Content-Range header field. A range-unit
   is defined in section 3.12 of RFC2616 as:

      range-unit       = bytes-unit | other-range-unit
      bytes-unit       = "bytes"
      other-range-unit = token

   An entity can be broken down into subranges according
   to various structural units.

   The only range unit defined by BWTP/1.0 is "bytes". BWTP/1.0
   implementations MAY ignore ranges specified using other units.
   BWTP/1.0 has been designed to allow implementations of applications
   that do not depend on knowledge of ranges.


4 BWTP Message

4.1 Message Types

   BWTP messages consist of inbound messages from client to server and 
   outbound message from the server to client:

       BWTP-message   = Inbound-message | Outbound-message    ; BWTP/1.0 messages

4.2 Generic Messages

   Inbound and Outbound messages use the generic message format of 
   RFC 822 [9] for transferring entities (the payload
   of the message). Both types of message consist of a start-line, zero
   or more header fields (also known as "headers"), an empty line (i.e.,
   a line with nothing preceding the CRLF) indicating the end of the
   header fields, and possibly a message-body.

        generic-message = start-line
                          *(message-header CRLF)
                          CRLF
                          [ message-body ]
                          [ *CRLF ]

        start-line      = "BWTP" SP message-URI SP content-length

        message-URI     = "*"               ; the connection default resource
                        | absoluteURI
                        | abs_path

        content-length  = 1*DIGIT

   In the interest of robustness, servers and clients SHOULD ignore any empty
   line(s) received where a start-line is expected. 


4.2 Message Headers

   BWTP header fields follow the same generic format as
   that given in Section 3.1 of RFC 822 [9]. Each header field consists
   of a name followed by a colon (":") and the field value. Field names
   are case-insensitive. The field value MAY be preceded by any amount
   of LWS, though a single SP is preferred. Header fields can be
   extended over multiple lines by preceding each extra line with at
   least one SP or HT. Applications ought to follow "common form", where
   one is known or indicated, when generating HTTP constructs, since
   there might exist some implementations that fail to accept anything
   beyond the common forms.

       message-header = field-name ":" [ field-value ]
       field-name     = token
       field-value    = *( field-content | LWS )
       field-content  = «the OCTETs making up the field-value
                        and consisting of either *TEXT or combinations
                        of token, separators, and quoted-string»

   The field-content does not include any leading or trailing LWS:
   linear white space occurring before the first non-whitespace
   character of the field-value or after the last non-whitespace
   character of the field-value. Such leading or trailing LWS MAY be
   removed without changing the semantics of the field value. Any LWS
   that occurs between field-content MAY be replaced with a single SP
   before interpreting the field value or forwarding the message
   downstream.

   The order in which header fields with differing field names are
   received is not significant. 

   Multiple message-header fields with the same field-name MAY be
   present in a message if and only if the entire field-value for that
   header field is defined as a comma-separated list [i.e., #(values)].
   It MUST be possible to combine the multiple header fields into one
   "field-name: field-value" pair, without changing the semantics of the
   message, by appending each subsequent field-value to the first, each
   separated by a comma. The order in which header fields with the same
   field-name are received is therefore significant to the
   interpretation of the combined field value, and thus a proxy MUST NOT
   change the order of these field values when a message is forwarded.

4.3 Message Body

   The presence of a message-body in a request is signalled by a non
   zero content-length in the message start-line. If a Content-Length
   field is included in the message-headers, it is ignored.

   The message body is defined as 

       message-body  = *OCTET

   
4.4 Message Length

   The message body length is determined by the content-length
   specified in the message start-line. 


4.5 General Header Fields

   There are a few header fields which have general applicability for
   both inbound and outbound messages, but which do not apply to the
   entity being transferred. These header fields apply only to the
   message being transmitted.

       general-header = Connection
                      | Date           
                      | Via              

   General-header field names can be extended reliably only in
   combination with a change in the protocol version. However, new or
   experimental header fields may be given the semantics of general
   header fields if all parties in the communication recognize them to
   be general-header fields. Unrecognized header fields are treated as
   entity-header fields.

5 Inbound Message

   An inbound message from a client to a server is a generic
   message with the restriction of the included headers to be 
   either general, inbound or entity headers:

     inbound-request   = "BWTP" SP message-URI SP content-length
                        *(( general-header | inbound-header | entity-header ) CRLF) 
                        CRLF
                        [ message-body ]        
                        [ CRLF ]


5.1 Inbound Message URI

   The inbound message-URI is a Uniform Resource Identifier and
   identifies the resource on the origin server to which the
   message is destined.   A message-URI of "*" means that the
   default URI of the connection.

   If the abs_path form is used for the inbound message URI, then
   the host of the resource is defined either by a Host header
   in the message or a Host header in the original upgrade request.
   
   The inbound message URI is not used by proxies to route messages.
   A message, even with an absolute URI or Host header that specifies
   a different origin server will be delivered to the origin server 
   identified in the original upgrade request.

   If the message-URI is encoded using the "% HEX HEX" encoding
   [42], the origin server MUST decode the Request-URI in order to
   properly interpret the request. 


5.3 Inbound Header Fields

   The inbound-header fields allow the client to pass additional
   information about the message, and about the client itself, to the
   server. These fields act as message modifiers, with semantics
   equivalent to the parameters on a programming language method
   invocation.

      inbound-header = Authorization         
                      | Host                  
                      | Origin
                      | Proxy-Authorization  
                      | User-Agent
                      | Cookie           ; TODO Maybe not?        

   inbound-header field names can be extended reliably only in
   combination with a change in the protocol version. However, new or
   experimental header fields MAY be given the semantics of request-
   header fields if all parties in the communication recognize them to
   be request-header fields. Unrecognized header fields are treated as
   entity-header fields.

5.4 Inbound Message Examples

   A minimal inbound message with default destination and
   content-type is

       BWTP * 12

       Hello World!

   An inbound message with default destination and content-type 
   and a content range

       BWTP * 5
       Content-Range: bytes 1-5/12

       Hello

   An inbound message that explicitly identifies a destination,
   content type and content encoding is

       BWTP /destination/path 12
       Content-Type: text/plain;charset=utf-8

       Hello World!

   An empty message with a Connection header:

       BWTP * 0
       Connection: close


6 Outbound Message

   An outbound message from a server to a client is a generic
   message with the restriction of the included headers to be 
   either general, outbound or entity headers:

     inbound-request   = "BWTP" SP message-URI SP content-length
                        *(( general-header | outbound-header | entity-header ) CRLF) 
                        CRLF
                        [ message-body ]        
                        [ CRLF ]


6.1 Outbound Message URI

   The outbound message-URI is a Uniform Resource Identifier and
   identifies the resource on the origin server from which the
   message has been sent.   A message-URI of "*" means that the
   default URI of the connection applies.

   If the abs_path form is used for the inbound message URI, then
   the host of the resource is defined either by a Host header
   in the message or a Host header in the original upgrade request.
   
   The outbound message URI is not used by proxies to route messages.
   All outbound messages on a connection will be delivered to the 
   user agent that initialized the connection.

   If the message-URI is encoded using the "% HEX HEX" encoding
   [42], the user agent  MUST decode the message-URI in order to
   properly interpret the message. 


6.2 Outbound Header Fields

   The outboudn-header fields allow the server to pass additional
   information about the message,
   These header fields give information about the server and about
   further access to the resource identified by the Message-URI.

       outbound-header = Location              
                       | Server                 
                       | WWW-Authenticate    
                       | Set-Cookie
                       | Content-Origin  TODO - the origin stuff needs more thought  

   Outbound header field names can be extended reliably only in
   combination with a change in the protocol version. However, new or
   experimental header fields MAY be given the semantics of response-
   header fields if all parties in the communication recognize them to
   be response-header fields. Unrecognized header fields are treated as
   entity-header fields.



6.3 Outbound Message Examples

   A minimal outbound message with default source and
   content-type is

       BWTP * 12

       Hello World!

   An outbound message with default destination and content-type 
   and a content range

       BWTP * 5
       Content-Range: bytes 1-5/12

       Hello

   An outbound message that explicitly identifies a source,
   content type, content encoding and Origin is

       BWTP /destination/path 12
       Content-Type: text/plain;charset=utf-8
       Origin: www.acme.com

       Hello World!

   An empty message with a Connection header:

       BWTP * 0
       Connection: close


7 Entity

   In this section, both sender and recipient refer to either the client
   or the server, depending on who sends and who receives the message.

7.1 Entity Header Fields

   Entity-header fields define metainformation about the entity-body or,
   if no body is present, about the resource identified by the request.
   Some of this metainformation is OPTIONAL; some might be REQUIRED by
   portions of this specification.

       entity-header  = Content-Encoding        
                      | Content-Language       
                      | Content-Location     
                      | Content-MD5         
                      | Content-Range      
                      | Content-Type      
                      | Expires          
                      | Last-Modified    
                      | extension-header

       extension-header = message-header

   The extension-header mechanism allows additional entity-header fields
   to be defined without changing the protocol, but these fields cannot
   be assumed to be recognizable by the recipient. Unrecognized header
   fields SHOULD be ignored by the recipient and MUST be forwarded by
   transparent proxies.


8 Connections

8.1 Negotiation
  
8.1.1 Upgrade Request
   A BWTP connection is initiated by a client issuing an upgrade request,
   which is a valid HTTP/1.1 GET request with an Upgrade header field set
   to the desired BWTP-Version:

     BWTP-Upgrade-Request = "GET" SP URI SP "HTTP/1.1" CRLF
                            *(message-header CRLF)
                            "Upgrade" ":" BWTP-Version
                            *(message-header CRLF) 
                            CRLF
                            [ message-body ]

   Since Upgrade is only for the immediate connection, the Upgrade Request SHOULD
   also contain a Connection header with "Upgrade" in it's values.

   The default values for all inbound messages on the resulting BWTP connection 
   are taken from:
     * The default message-URI is the URI of the upgrade request.
     * The default host is the host given either in an absolute URI or in a
       Host header.
     * Any header field with a name starting with "BWTP-" is used as 
       a default field of all inbound BWTP messages, with the leading 
       "BWTP-" stripped from the name.

   An example Upgrade Request example

     GET /path HTTP/1.1
     Host: host.com:80
     Upgrade: BWTP/1.0
     Connection: Upgrade
     Origin: the.origin.com
     Authorization: BASIC amd73ksosh3hj210sd3d0dk1
     BWTP-Content-Type: text/plain;charset=utf-8

   This request, if accepted, has the following inbound messages defaults:
     message-URI    /path
     host           host.com
     port           80 
     Content-Type   text/plain;charset=utf-8

   If an intermediary in the HTTP connection accept the upgrade, they MUST 
   forward the Upgrade header in their requests towards the origin server.

8.1.2 Upgrade Response

   When an origin server receives an Upgrade request and the resource specified
   by the URI accepts the upgrade, then acceptance is indicated by sending
   an Upgrade Response:

     BWTP-Upgrade-Response = "HTTP/1.1" SP 101 SP "Bidirectional Web Transfer Protocol" CRLF
                            *(message-header CRLF)
                            "Upgrade" ":" BWTP-Version
                            *(message-header CRLF) 
                            CRLF

   The default values for all outbound messages on the resulting BWTP connection 
   are taken from:
     * The default message-URI is the URI of the upgrade request.
     * The default host is the host given either in an absolute URI or in a
       Host header of the upgrade request.
     * Any header field in the response with a name starting with "BWTP-" is used as 
       a default field of all outbound BWTP messages, with the leading "BWTP-" stripped
       from the name.
   
   An example Upgrade Response example is

     HTTP/1.1 101 Bidirectional Web Transfer Protocol
     BWTP-Content-Origin: the.origin.com
     BWTP-Content-Type: text/plain;charset=utf-8

   
   This request, if sent in response to the prior Upgrade Request example, has the 
   following outbound messages defaults:
     message-URI    /path
     host           host.com
     port           80 
     Content-Type   text/plain;charset=utf-8
     Content-Origin the.origin.com

8.2 Flow Control

   BWTP/1.1 servers SHOULD maintain connections and use TCP's
   flow control mechanisms to resolve temporary overloads, rather than
   terminating connections with the expectation that clients will retry.
   The latter technique can exacerbate network congestion.


8.3 Closing Connections

8.3.1 Spontaneous Connection close

   Either the client or server or any intermediary MAY at any time 
   close the BWTP. Message delivery is not guaranteed if a spontaneous
   close is performed.  Clients, servers and intermediaries SHOULD 
   use orderly connection close if guaranteed delivery is required.
   
8.3.2 Orderly Connection close
   
   Either the client or server or any intermediary MAY initiate an
   orderly shutdown of a BWTP connection by sending a message with 
   a "Connection" header field with a value of "Close". After sending 
   such a message, messages MUST NOT be sent on the connection,
   but messages SHOULD continue to be received and processed until  
   amessage is received that also contains a Connection Close header.
   The connection may then be closed.

   A client or server that is not closing the connection, on receipt of 
   any message that contains a Connection Close header should immediately 
   flush any pending or queued messages for the connection and the last
   message sent should have a Connection close header. After sending
   the last message, the connection may be closed.

   The connection close header may be sent on any valid BWTP message.
   If no message is queued or available to carry a close header, then
   an empty BWTP message may be sent:

       BWTP * 0
       Connection: close



11 Access Authentication

   HTTP provides several OPTIONAL challenge-response authentication
   mechanisms which can be used by a server to challenge a client
   request and by a client to provide authentication information. The
   general framework for access authentication, and the specification of
   "basic" and "digest" authentication, are specified in "HTTP
   Authentication: Basic and Digest Access Authentication" [43]. This
   specification adopts the definitions of "challenge" and "credentials"
   from that specification.



14 Header Field Definitions


15 Security Considerations

16 Acknowledgments


17 References




18 Authors' Addresses



19 Appendices


20 Index

   Please see the PostScript version of this RFC for the INDEX.



21.  Full Copyright Statement

   Copyright (C) The Internet Society (1999).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Acknowledgement

   Funding for the RFC Editor function is currently provided by the
   Internet Society.

















--------------000809000107080105040200--

From pieterh@gmail.com  Wed Jun 10 10:21:07 2009
Return-Path: <pieterh@gmail.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 BD7123A6A24 for <hybi@core3.amsl.com>; Wed, 10 Jun 2009 10:21:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level: 
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 hKaxUI7y0viO for <hybi@core3.amsl.com>; Wed, 10 Jun 2009 10:21:07 -0700 (PDT)
Received: from mail-fx0-f213.google.com (mail-fx0-f213.google.com [209.85.220.213]) by core3.amsl.com (Postfix) with ESMTP id C692D3A6C16 for <hybi@ietf.org>; Wed, 10 Jun 2009 10:21:06 -0700 (PDT)
Received: by fxm9 with SMTP id 9so948797fxm.37 for <hybi@ietf.org>; Wed, 10 Jun 2009 10:21:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=HQMF+bEqqS93C+glQSl1tA4Ngkd1vcVJeKJLyah/h04=; b=lIZbChsuaJjDQcX+nSCsltdirdEEPeJQm/XmXYf91vRBqQ0fbCckPeW4GxCnSiBzqx ncBfQ8Hgjl9fRxXOXNgE5UnV3/JwjUqtBP0Z2M7kvCBb4y0bVGo3NE6kXzGB7Vg1+v7e DAGyU+E+kDI1ca9nyf6NidqU6+Ejzrm5oADl0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=Gcjd6f3IAI8BVH9U+wR6TRWTaTymSz6xce1l+JMI7Oa+e9IQvhiVKnebIUpQVmeOLm wPsdM2sowoSFC3FfkQT5uQYM3vCgaBKcdNWxqF2itvSOGjcU/aoL2ssB4zZ+ShMFxube HO3xd2rbcqOeb8629/N20S/uNA3VqUaiPAl9Q=
MIME-Version: 1.0
Sender: pieterh@gmail.com
Received: by 10.86.92.9 with SMTP id p9mr1312321fgb.15.1244654469966; Wed, 10  Jun 2009 10:21:09 -0700 (PDT)
In-Reply-To: <4A2F7BB2.5000105@webtide.com>
References: <4A2F7BB2.5000105@webtide.com>
From: Pieter Hintjens <ph@imatix.com>
Date: Wed, 10 Jun 2009 19:20:48 +0200
X-Google-Sender-Auth: c03b0ebd9163900c
Message-ID: <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 10 Jun 2009 17:21:07 -0000

On Wed, Jun 10, 2009 at 11:24 AM, Greg Wilkins<gregw@webtide.com> wrote:

> Attached in a very very early draft of an alternative proposal for a
> transfer protocol for HTML5 WebSockets. =A0For lack of a better
> name (and not wanting to coopt the hybi name), I've called it
> =A0BWTP - Bidirection Web Transfer Protocol
>
> I wont explain the protocol here, as hopefully the proposal
> document does that sufficiently well.

I'd be interested in reviewing and eventually implementing this, but
it would be helpful if you could explain BWTP in terms of the
differences between it and RFC2616.  As presented, I need to do a
manual diff to see what the significant changes are.

Cheers,
Pieter Hintjens

From gregw@webtide.com  Wed Jun 10 15:24:32 2009
Return-Path: <gregw@webtide.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 26DF43A6A19 for <hybi@core3.amsl.com>; Wed, 10 Jun 2009 15:24:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[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 nhJTCYU+1PUP for <hybi@core3.amsl.com>; Wed, 10 Jun 2009 15:24:31 -0700 (PDT)
Received: from mail-px0-f176.google.com (mail-px0-f176.google.com [209.85.216.176]) by core3.amsl.com (Postfix) with ESMTP id 4D3183A68AD for <hybi@ietf.org>; Wed, 10 Jun 2009 15:24:31 -0700 (PDT)
Received: by pxi6 with SMTP id 6so1160893pxi.29 for <hybi@ietf.org>; Wed, 10 Jun 2009 15:24:36 -0700 (PDT)
Received: by 10.114.161.11 with SMTP id j11mr2805720wae.65.1244672676316; Wed, 10 Jun 2009 15:24:36 -0700 (PDT)
Received: from ?10.10.1.16? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 30sm8646205pxi.52.2009.06.10.15.24.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Jun 2009 15:24:35 -0700 (PDT)
Message-ID: <4A30329E.9070000@webtide.com>
Date: Thu, 11 Jun 2009 08:24:30 +1000
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: hybi@ietf.org
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com>
In-Reply-To: <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 10 Jun 2009 22:24:32 -0000

Pieter,

I've added you as a collaborator on the google doc.
I've also added an appendix on the differences with HTTP/1.1, which
for the benefits of the list is

Appendix A. Key differences with HTTP/1.1

   The BWTP has been substantially based on HTTP/1.1 and the RFC2616 document
   that specifies it.  The key differences with HTTP/1.1 are:
     * A BWTP connection cannot be directly established by a client, but
       must be upgraded from a HTTP connection.
     * There is no relationship (like request/response) between inbound
       and outbound messages
     * There are no methods or statuses associated with messages.
     * Messages may either be completely self describing or rely on meta
       data associated with the connection that is established during upgrade.
     * A message content length is included in the message start line
     * An orderly close sequence is specified
     * There is no caching mechanism


With regards to work needed on the document - the security mechanism
needs to be reviewed and an Origin and acceptable-Origin mechanism
defined.

Also the document needs section 14 to be completed with Header Field
Definitions.  These will mostly be from RFC2616, but some will not
be applicable, some will need to be modified and there should be
a few new ones.


Oh and the document needs to be converted to something that does
not have hard coded formatting.  What is commonly used for
this? nroff? docbook?


cheers



Pieter Hintjens wrote:
> On Wed, Jun 10, 2009 at 11:24 AM, Greg Wilkins<gregw@webtide.com> wrote:
> 
>> Attached in a very very early draft of an alternative proposal for a
>> transfer protocol for HTML5 WebSockets.  For lack of a better
>> name (and not wanting to coopt the hybi name), I've called it
>>  BWTP - Bidirection Web Transfer Protocol
>>
>> I wont explain the protocol here, as hopefully the proposal
>> document does that sufficiently well.
> 
> I'd be interested in reviewing and eventually implementing this, but
> it would be helpful if you could explain BWTP in terms of the
> differences between it and RFC2616.  As presented, I need to do a
> manual diff to see what the significant changes are.
> 
> Cheers,
> Pieter Hintjens


From pieterh@gmail.com  Thu Jun 11 00:41:56 2009
Return-Path: <pieterh@gmail.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 D90193A67A6 for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 00:41:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level: 
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 Ltuvu7yySww3 for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 00:41:55 -0700 (PDT)
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by core3.amsl.com (Postfix) with ESMTP id 87D9F3A67A1 for <hybi@ietf.org>; Thu, 11 Jun 2009 00:41:55 -0700 (PDT)
Received: by fg-out-1718.google.com with SMTP id 13so355268fge.18 for <hybi@ietf.org>; Thu, 11 Jun 2009 00:41:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=DKpg94+WwRdOysXUwlXG8WkKIWFYTemsWZ2Xc5fttBE=; b=JoQSt5slbLzrF9WgaVVHOv/x4uqoYkJ9oTKDZYjS3R1Op44AemgMupO7zL1ioLmFAE OTJhQN+P8oM6wo8yWrpWkiMDp4vdK52Rr2ZNOdVj2UQqcbkSMKvRImIwq9iczmbJflMJ crQUCx/BRIil0K20umA5QD7StVAC1Uf8qyrcQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=BsfanY2Fe2cpa9mOidMppqMFli/rgLpJ9DJz2I56U3z13zT0CG16QkBwRGqI1E2gRb w6zSnQgxALmcsxOsece9MqbS3w2ruLnTWbxVDY40bxZLHsWQadqzNq1PQ1czab3viQ4f l54yFNoGfyNPdIdnZcn2BvL5smeliokq/ehMw=
MIME-Version: 1.0
Sender: pieterh@gmail.com
Received: by 10.86.3.11 with SMTP id 11mr1920182fgc.11.1244706119317; Thu, 11  Jun 2009 00:41:59 -0700 (PDT)
In-Reply-To: <4A30329E.9070000@webtide.com>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com>  <4A30329E.9070000@webtide.com>
From: Pieter Hintjens <ph@imatix.com>
Date: Thu, 11 Jun 2009 09:41:39 +0200
X-Google-Sender-Auth: e1b665cd95dbc0a0
Message-ID: <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Thu, 11 Jun 2009 07:41:56 -0000

On Thu, Jun 11, 2009 at 12:24 AM, Greg Wilkins<gregw@webtide.com> wrote:

> I've added you as a collaborator on the google doc.
> I've also added an appendix on the differences with HTTP/1.1, which
> for the benefits of the list is
>
> Appendix A. Key differences with HTTP/1.1

Fair enough.  Would it be correct to describe this as an asynchronous
message framing protocol designed to be layered on top of HTTP?  The
reason for using this protocol is then to implement asynchronous
client-to-server or server-to-client messaging with minimal overhead,
using an established HTTP connection as the basis.

Thus, the complex one-off work (like authentication) is done using
synchronous, pedantic HTTP while the high volume work (message
transfer) is done using fast, asynchronous BWTP?  Presumably after
switching to BWTP, one does not return to HTTP.

This is a good pattern IMO.

> With regards to work needed on the document - the security mechanism
> needs to be reviewed and an Origin and acceptable-Origin mechanism
> defined.
>
> Also the document needs section 14 to be completed with Header Field
> Definitions. =A0These will mostly be from RFC2616, but some will not
> be applicable, some will need to be modified and there should be
> a few new ones.
>
> Oh and the document needs to be converted to something that does
> not have hard coded formatting. =A0What is commonly used for
> this? nroff? docbook?

My proposal would be to use a wiki, where the text can be edited
collaboratively, and where we can track issues and todos.  I usually
use wikidot.com for such things (e.g. www.restms.org).  Glad to set
that up if you need it.

It's pretty simple to convert from any random wiki text to an IETF
standard layout when it's time to do that.  Hard formatting before
that point is just a PITA.

Cheers,
Pieter

From kris@sitepen.com  Thu Jun 11 07:25:25 2009
Return-Path: <kris@sitepen.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 022683A67F4 for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 07:25:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 e1OI2LA8jEnC for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 07:25:23 -0700 (PDT)
Received: from rs48.luxsci.com (rs48.luxsci.com [65.61.166.92]) by core3.amsl.com (Postfix) with ESMTP id C3D7B3A683D for <hybi@ietf.org>; Thu, 11 Jun 2009 07:25:23 -0700 (PDT)
Received: from [192.168.0.66] (71-213-95-107.slkc.qwest.net [71.213.95.107]) (authenticated bits=0) by rs48.luxsci.com (8.13.1/8.13.7) with ESMTP id n5BEPR7m022760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 11 Jun 2009 09:25:30 -0500
Message-ID: <4A3113D7.8090905@sitepen.com>
Date: Thu, 11 Jun 2009 08:25:27 -0600
From: Kris Zyp <kris@sitepen.com>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: Greg Wilkins <gregw@webtide.com>
References: <4A2F7BB2.5000105@webtide.com>
In-Reply-To: <4A2F7BB2.5000105@webtide.com>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Thu, 11 Jun 2009 14:25:25 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 


Greg Wilkins wrote:
>
> + Because of it's similarity to HTTP, it is intended that existing
> HTTP clients, servers and intermediaries will be able to be
> minimally updated to support this protocol. This will not require
> entirely new protocol libraries to be developed.   Existing
> development and analysis tools will also be able to be easily
> updated, plus the protocol is mostly human readable.
Maybe I missing something about this in discussions, but I thought one
of the core ideas of WebSockets was to use CONNECT to
tunnel through existing proxies. Is there hope that BWTP would somehow
be properly handled by existing intermediaries, or would it require an
update to proxies? It certainly seems that if it is possible to build
the protocol such that it will work over existing proxies, that would
be greatly preferable. If this won't work across in current proxied
environments, uptake will be much slower (if at all), won't it?

- --
Kris Zyp
SitePen
(503) 806-1841
http://sitepen.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iEYEARECAAYFAkoxE9YACgkQ9VpNnHc4zAwxQACgrEphCoLbrdic89wlmXmVOidh
P14AoKipXqcTqol4KOMYqYgU+ECNf43c
=SN7W
-----END PGP SIGNATURE-----


From martin.tyler@boo.org  Thu Jun 11 07:37:55 2009
Return-Path: <martin.tyler@boo.org>
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 5A5233A6B9D for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 07:37:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.976
X-Spam-Level: 
X-Spam-Status: No, score=-1.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001]
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 uzWkEEW57Ldq for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 07:37:54 -0700 (PDT)
Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by core3.amsl.com (Postfix) with ESMTP id C28C83A6AF1 for <hybi@ietf.org>; Thu, 11 Jun 2009 07:37:53 -0700 (PDT)
Received: by bwz9 with SMTP id 9so1498331bwz.37 for <hybi@ietf.org>; Thu, 11 Jun 2009 07:37:58 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.102.215.19 with SMTP id n19mr1325044mug.122.1244731077876;  Thu, 11 Jun 2009 07:37:57 -0700 (PDT)
In-Reply-To: <4A3113D7.8090905@sitepen.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com>
Date: Thu, 11 Jun 2009 15:37:57 +0100
Message-ID: <44abafb90906110737u5df02b48p6af07496e0e04e95@mail.gmail.com>
From: Martin Tyler <martin.tyler@boo.org>
To: hybi@ietf.org
Content-Type: multipart/alternative; boundary=0016e6d42bbabcde25046c1389df
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Thu, 11 Jun 2009 14:37:55 -0000

--0016e6d42bbabcde25046c1389df
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi Kris,

That is the intention, I mentioned it to Greg and he's added a TODO to the
document.

I think Greg might have confused a couple of people with his first email on
this.. it basically an alternative to the existing WebSocket proposal, works
the same way fundamentally, but in a way that fits better in style with HTTP
both in the protocol itself, and how it is documented.

Regards
Martin

On Thu, Jun 11, 2009 at 3:25 PM, Kris Zyp <kris@sitepen.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
>
> Greg Wilkins wrote:
> >
> > + Because of it's similarity to HTTP, it is intended that existing
> > HTTP clients, servers and intermediaries will be able to be
> > minimally updated to support this protocol. This will not require
> > entirely new protocol libraries to be developed.   Existing
> > development and analysis tools will also be able to be easily
> > updated, plus the protocol is mostly human readable.
> Maybe I missing something about this in discussions, but I thought one
> of the core ideas of WebSockets was to use CONNECT to
> tunnel through existing proxies. Is there hope that BWTP would somehow
> be properly handled by existing intermediaries, or would it require an
> update to proxies? It certainly seems that if it is possible to build
> the protocol such that it will work over existing proxies, that would
> be greatly preferable. If this won't work across in current proxied
> environments, uptake will be much slower (if at all), won't it?
>
> - --
> Kris Zyp
> SitePen
> (503) 806-1841
> http://sitepen.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkoxE9YACgkQ9VpNnHc4zAwxQACgrEphCoLbrdic89wlmXmVOidh
> P14AoKipXqcTqol4KOMYqYgU+ECNf43c
> =SN7W
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--0016e6d42bbabcde25046c1389df
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi Kris,<br><br>That is the intention, I mentioned it to Greg and he&#39;s =
added a TODO to the document.<br><br>I think Greg might have confused a cou=
ple of people with his first email on this.. it basically an alternative to=
 the existing WebSocket proposal, works the same way fundamentally, but in =
a way that fits better in style with HTTP both in the protocol itself, and =
how it is documented.<br>
<br>Regards<br>Martin<br><br><div class=3D"gmail_quote">On Thu, Jun 11, 200=
9 at 3:25 PM, Kris Zyp <span dir=3D"ltr">&lt;<a href=3D"mailto:kris@sitepen=
.com">kris@sitepen.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_=
quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt =
0pt 0.8ex; padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<div class=3D"im"><br>
<br>
<br>
Greg Wilkins wrote:<br>
&gt;<br>
&gt; + Because of it&#39;s similarity to HTTP, it is intended that existing=
<br>
&gt; HTTP clients, servers and intermediaries will be able to be<br>
&gt; minimally updated to support this protocol. This will not require<br>
&gt; entirely new protocol libraries to be developed. =A0 Existing<br>
&gt; development and analysis tools will also be able to be easily<br>
&gt; updated, plus the protocol is mostly human readable.<br>
</div>Maybe I missing something about this in discussions, but I thought on=
e<br>
of the core ideas of WebSockets was to use CONNECT to<br>
tunnel through existing proxies. Is there hope that BWTP would somehow<br>
be properly handled by existing intermediaries, or would it require an<br>
update to proxies? It certainly seems that if it is possible to build<br>
the protocol such that it will work over existing proxies, that would<br>
be greatly preferable. If this won&#39;t work across in current proxied<br>
environments, uptake will be much slower (if at all), won&#39;t it?<br>
<br>
- --<br>
Kris Zyp<br>
SitePen<br>
(503) 806-1841<br>
<a href=3D"http://sitepen.com" target=3D"_blank">http://sitepen.com</a><br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.9 (MingW32)<br>
Comment: Using GnuPG with Mozilla - <a href=3D"http://enigmail.mozdev.org" =
target=3D"_blank">http://enigmail.mozdev.org</a><br>
<br>
iEYEARECAAYFAkoxE9YACgkQ9VpNnHc4zAwxQACgrEphCoLbrdic89wlmXmVOidh<br>
P14AoKipXqcTqol4KOMYqYgU+ECNf43c<br>
=3DSN7W<br>
-----END PGP SIGNATURE-----<br>
<div><div></div><div class=3D"h5"><br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</div></div></blockquote></div><br>

--0016e6d42bbabcde25046c1389df--

From gregw@webtide.com  Thu Jun 11 07:38:44 2009
Return-Path: <gregw@webtide.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 38EEF3A6BCE for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 07:38:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[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 8QuuAqsf8K4Q for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 07:38:43 -0700 (PDT)
Received: from mail-px0-f175.google.com (mail-px0-f175.google.com [209.85.216.175]) by core3.amsl.com (Postfix) with ESMTP id 77FD73A6B9D for <hybi@ietf.org>; Thu, 11 Jun 2009 07:38:43 -0700 (PDT)
Received: by pxi5 with SMTP id 5so271895pxi.29 for <hybi@ietf.org>; Thu, 11 Jun 2009 07:38:49 -0700 (PDT)
Received: by 10.114.106.1 with SMTP id e1mr4188134wac.158.1244731129139; Thu, 11 Jun 2009 07:38:49 -0700 (PDT)
Received: from ?10.10.1.15? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 15sm148368pxi.23.2009.06.11.07.38.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Jun 2009 07:38:48 -0700 (PDT)
Message-ID: <4A3116F4.9040208@webtide.com>
Date: Fri, 12 Jun 2009 00:38:44 +1000
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: Kris Zyp <kris@sitepen.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com>
In-Reply-To: <4A3113D7.8090905@sitepen.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Thu, 11 Jun 2009 14:38:44 -0000

Kris,

The intent of BWTP is that eventually intermediaries would be
updated to understand it and even participate in the connection (for
example initiating an orderly close).

However, if the proxy does not support the upgrade request,
then BWTP would also able to be sent over a tunnel established
by a CONNECT.

Note that this is the same for the websocket when it tries to
do an upgrade but encounters a transparent proxy that does not
support the upgrade.

However, because BWTP is so similar to HTTP, the work needed
to upgrade a proxy should be minimal.

cheers


Kris Zyp wrote:
> 
> 
> Greg Wilkins wrote:
>> + Because of it's similarity to HTTP, it is intended that existing
>> HTTP clients, servers and intermediaries will be able to be
>> minimally updated to support this protocol. This will not require
>> entirely new protocol libraries to be developed.   Existing
>> development and analysis tools will also be able to be easily
>> updated, plus the protocol is mostly human readable.
> Maybe I missing something about this in discussions, but I thought one
> of the core ideas of WebSockets was to use CONNECT to
> tunnel through existing proxies. Is there hope that BWTP would somehow
> be properly handled by existing intermediaries, or would it require an
> update to proxies? It certainly seems that if it is possible to build
> the protocol such that it will work over existing proxies, that would
> be greatly preferable. If this won't work across in current proxied
> environments, uptake will be much slower (if at all), won't it?
> 

From gregw@webtide.com  Thu Jun 11 08:02:52 2009
Return-Path: <gregw@webtide.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 A23333A6997 for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 08:02:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000,  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 eqCp64mqLJRS for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 08:02:51 -0700 (PDT)
Received: from mail-pz0-f204.google.com (mail-pz0-f204.google.com [209.85.222.204]) by core3.amsl.com (Postfix) with ESMTP id 10B373A6932 for <hybi@ietf.org>; Thu, 11 Jun 2009 08:02:51 -0700 (PDT)
Received: by pzk42 with SMTP id 42so548250pzk.29 for <hybi@ietf.org>; Thu, 11 Jun 2009 08:02:51 -0700 (PDT)
Received: by 10.114.53.1 with SMTP id b1mr4138993waa.24.1244732571172; Thu, 11 Jun 2009 08:02:51 -0700 (PDT)
Received: from ?10.10.1.15? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 4sm144305pxi.66.2009.06.11.08.02.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Jun 2009 08:02:50 -0700 (PDT)
Message-ID: <4A311C96.5010605@webtide.com>
Date: Fri, 12 Jun 2009 01:02:46 +1000
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: Pieter Hintjens <ph@imatix.com>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com> <4A30329E.9070000@webtide.com> <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com>
In-Reply-To: <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Thu, 11 Jun 2009 15:02:52 -0000

Pieter Hintjens wrote:
> On Thu, Jun 11, 2009 at 12:24 AM, Greg Wilkins<gregw@webtide.com> wrote:
> 
>> I've added you as a collaborator on the google doc.
>> I've also added an appendix on the differences with HTTP/1.1, which
>> for the benefits of the list is
>>
>> Appendix A. Key differences with HTTP/1.1
> 
> Fair enough.  Would it be correct to describe this as an asynchronous
> message framing protocol designed to be layered on top of HTTP?  


Not layered "on top" of HTTP, but dependent on HTTP to open a
connection, but that connection would then be upgraded to BWTP
and HTTP would no longer be used.


> The
> reason for using this protocol is then to implement asynchronous
> client-to-server or server-to-client messaging with minimal overhead,
> using an established HTTP connection as the basis.

Yes


> Thus, the complex one-off work (like authentication) is done using
> synchronous, pedantic HTTP while the high volume work (message
> transfer) is done using fast, asynchronous BWTP?  Presumably after
> switching to BWTP, one does not return to HTTP.

I've not planned to support a downgrade to HTTP.

> This is a good pattern IMO.

cool!

>> With regards to work needed on the document - the security mechanism
>> needs to be reviewed and an Origin and acceptable-Origin mechanism
>> defined.
>>
>> Also the document needs section 14 to be completed with Header Field
>> Definitions.  These will mostly be from RFC2616, but some will not
>> be applicable, some will need to be modified and there should be
>> a few new ones.
>>
>> Oh and the document needs to be converted to something that does
>> not have hard coded formatting.  What is commonly used for
>> this? nroff? docbook?
> 
> My proposal would be to use a wiki, where the text can be edited
> collaboratively, and where we can track issues and todos.  I usually
> use wikidot.com for such things (e.g. www.restms.org).  Glad to set
> that up if you need it.

a wiki would be better than google docs, because it would have
history.

I've created a site at  http://bwtp.wikidot.com
You can join at http://bwtp.wikidot.com/system:join
and the password is MustHaveMeta

I've not yet moved the document over.

> It's pretty simple to convert from any random wiki text to an IETF
> standard layout when it's time to do that.  Hard formatting before
> that point is just a PITA.

+1

cheers



From pieterh@gmail.com  Thu Jun 11 09:27:04 2009
Return-Path: <pieterh@gmail.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 CA4403A67AA for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 09:27:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level: 
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 eqCqwQGluHEG for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 09:26:59 -0700 (PDT)
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by core3.amsl.com (Postfix) with ESMTP id 2642A3A69DF for <hybi@ietf.org>; Thu, 11 Jun 2009 09:26:58 -0700 (PDT)
Received: by fg-out-1718.google.com with SMTP id d23so1286527fga.18 for <hybi@ietf.org>; Thu, 11 Jun 2009 09:27:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=WwW3KLkjwjI/MnEGbGrGHsehNvSsflmL4U7oRfdjsaU=; b=rFLut9RTZ2mwXRThXg4XGCrStnVFNsjHxWOaaYJIbdoK+av2hmjB437aLAhvQzXHjI Nq43Sn7AacpYppxtQps4Ect94ydoDr3FofJGhqT2FCp1cqb5Zf1C1/6ttKjwn0HY/HA5 XvbC+Ykwib9SX4ZILFsl8zp/MC66Uu9v83/HU=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=Z0R4XwQygZZRm+Q1rmGI2rnV6bHR26a9Rj8vTplyat5CNwoejk6ny8s3mw36c1t7/c SQZUAIiE4wlp3zLQRocE9pbN9eMyBbmjwCYx/v2KzJJgdf4U0sLbEYIWc9POrl+j6JoP Vv3BlnHx841I89AfPyoikeWJWi6uGJTOJNebc=
MIME-Version: 1.0
Sender: pieterh@gmail.com
Received: by 10.86.26.11 with SMTP id 11mr2466092fgz.45.1244737623263; Thu, 11  Jun 2009 09:27:03 -0700 (PDT)
In-Reply-To: <4A311C96.5010605@webtide.com>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com>  <4A30329E.9070000@webtide.com> <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com>  <4A311C96.5010605@webtide.com>
From: Pieter Hintjens <ph@imatix.com>
Date: Thu, 11 Jun 2009 18:26:43 +0200
X-Google-Sender-Auth: 2dcb7d2bbb764b5d
Message-ID: <5821ea240906110926p4ee80bb9s464d575e12fcc52f@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Thu, 11 Jun 2009 16:27:04 -0000

On Thu, Jun 11, 2009 at 5:02 PM, Greg Wilkins<gregw@webtide.com> wrote:

> I've not planned to support a downgrade to HTTP.

That's fine, the pattern of synchronous control followed by
asynchronous data is simple, and matches the real world use cases I've
seen.  This is naturally handled by two protocols, and HTTP -> BWTP
feels exactly right.

Presumably we could do a kind of BWTP emulation over HTTP, for
prototyping or proof of concept.

FWIW, I've been trying to get this pattern into AMQP (www.amqp.org)
for about two years, without success.

> a wiki would be better than google docs, because it would have
> history.
>
> I've created a site at =A0http://bwtp.wikidot.com
> You can join at http://bwtp.wikidot.com/system:join
> and the password is MustHaveMeta

You might want to add some legal framing so that contributions are
properly reusable.  Digistan.org has a template (spec.digistan.org),
which we used for restms.org.  It just avoids the problem that a
contributor 'accidentally' adds something they then patent.

There is also a legal package at packages.wikidot.com, which may be suffici=
ent.

Cheers,
Pieter

From prescod@gmail.com  Thu Jun 11 12:14:08 2009
Return-Path: <prescod@gmail.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 8A11D28C1D6 for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 12:14:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.976
X-Spam-Level: 
X-Spam-Status: No, score=-1.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001]
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 QQNIlwAI2nG3 for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 12:14:07 -0700 (PDT)
Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by core3.amsl.com (Postfix) with ESMTP id 5F1F13A68F2 for <hybi@ietf.org>; Thu, 11 Jun 2009 12:14:06 -0700 (PDT)
Received: by yw-out-2324.google.com with SMTP id 3so819847ywj.49 for <hybi@ietf.org>; Thu, 11 Jun 2009 12:14:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=KXVLtENhpOvcy/tUPPeJXJdpgNmEBDmei2ab6IPENfI=; b=Cqaa9DJWE/C1zc7hyESaTtzALvJy+Cpbe1PuNE849QkmG2l7VirWFS29nX1lsh0rgf 8soQd4LY923UZr0h+Ew+Y+C4XDXdgQQUCdPQKz9XR2OeMvL47lAdc/1Nw2IRJlNxhe9X Oyht3d9vh+DMy9TR4YK02OQM5LNO9JjxkkRzY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=LglmFRxJSbcWp0DG4g5JvJh5HOzafFVDjglbiG+ytRD6KVzUgb65IacMX+XZsXOMke pUuQ9nXPgTzipkRDy5o01KMsUmQlf8Qkytm8wGDgSffAC7cRfY2I1cMZEqdEGrZ8DTPt kxnYl8jeRPl43HBESM6/FB6/6WmXfl3J2HWS4=
MIME-Version: 1.0
Sender: prescod@gmail.com
Received: by 10.151.110.13 with SMTP id n13mr5668830ybm.285.1244747651560;  Thu, 11 Jun 2009 12:14:11 -0700 (PDT)
In-Reply-To: <4A30329E.9070000@webtide.com>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com> <4A30329E.9070000@webtide.com>
Date: Thu, 11 Jun 2009 12:14:11 -0700
X-Google-Sender-Auth: 4f25996666f14ef6
Message-ID: <1cb725390906111214o1139491k2bd74c0ccc994005@mail.gmail.com>
From: Paul Prescod <paul@prescod.net>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: multipart/alternative; boundary=00151750e4da9b377c046c176512
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Thu, 11 Jun 2009 19:14:08 -0000

--00151750e4da9b377c046c176512
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Could you justify the "non-obvious" changes from RFC2616?

  The BWTP has been substantially based on HTTP/1.1 and the RFC2616 document
>   that specifies it.  The key differences with HTTP/1.1 are:
>     * A BWTP connection cannot be directly established by a client, but
>       must be upgraded from a HTTP connection.
>

Okay.


>     * There is no relationship (like request/response) between inbound
>       and outbound messages


Is this "simplification" worth the cost of being different from RFC2616? As
we all know, one can implement fire-and-forget on top of request/response or
vice versa. One could imagine a trivial mod_async which merely returns 200
OK to every message before queuing it for internal processing. On the client
side, async HTTP already exists.

I also wonder the simplification of the protocol is worth the cost of being
different for all of the following:

    * There are no methods or statuses associated with messages.
>
    * Messages may either be completely self describing or rely on meta
>       data associated with the connection that is established during
> upgrade.
>     * A message content length is included in the message start line


This one seems necessary:


>     * An orderly close sequence is specified


WRT:


>     * There is no caching mechanism


HTTP's caching mechanism is already optional, right?

One virtue of staying closer to HTTP is that one can easily imagine how
existing AJAX APIs and code could be adjusted to use the BWTP socket easily.
For that reason, I am leaning towards the belief that BWTP should try to be
a superset of unidirectional HTTP.

 Paul Prescod

--00151750e4da9b377c046c176512
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Could you justify the &quot;non-obvious&quot; changes from RFC2616?<br><div=
 class=3D"gmail_quote"><br><blockquote class=3D"gmail_quote" style=3D"borde=
r-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-le=
ft: 1ex;">
=C2=A0 The BWTP has been substantially based on HTTP/1.1 and the RFC2616 do=
cument<br>
 =C2=A0 that specifies it. =C2=A0The key differences with HTTP/1.1 are:<br>
 =C2=A0 =C2=A0 * A BWTP connection cannot be directly established by a clie=
nt, but<br>
 =C2=A0 =C2=A0 =C2=A0 must be upgraded from a HTTP connection.<br>
 </blockquote><div><br>Okay.<br>=C2=A0</div><blockquote class=3D"gmail_quot=
e" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt =
0.8ex; padding-left: 1ex;">=C2=A0 =C2=A0 * There is no relationship (like r=
equest/response) between inbound<br>

 =C2=A0 =C2=A0 =C2=A0 and outbound messages</blockquote><div><br>Is this &q=
uot;simplification&quot; worth the cost of being different from RFC2616? As=
 we all know, one can implement fire-and-forget on top of request/response =
or vice versa. One could imagine a trivial mod_async which merely returns 2=
00 OK to every message before queuing it for internal processing. On the cl=
ient side, async HTTP already exists.<br>
=C2=A0<br>I also wonder the simplification of the protocol is worth the cos=
t of being different for all of the following:<br><br></div><blockquote cla=
ss=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); marg=
in: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
=C2=A0 =C2=A0 * There are no methods or statuses associated with messages.=
=C2=A0<br></blockquote><blockquote class=3D"gmail_quote" style=3D"border-le=
ft: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: =
1ex;">=C2=A0 =C2=A0 * Messages may either be completely self describing or =
rely on meta<br>

 =C2=A0 =C2=A0 =C2=A0 data associated with the connection that is establish=
ed during upgrade.<br>
 =C2=A0 =C2=A0 * A message content length is included in the message start =
line</blockquote><div><br>This one seems necessary:<br>=C2=A0</div><blockqu=
ote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204=
); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
=C2=A0 =C2=A0 * An orderly close sequence is specified</blockquote><div><br=
>WRT:<br>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"border-left=
: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1e=
x;">=C2=A0 =C2=A0 * There is no caching mechanism</blockquote>
<div><br>HTTP&#39;s caching mechanism is already optional, right? <br><br>O=
ne virtue of staying closer to HTTP is that one can easily imagine how exis=
ting AJAX APIs and code could be adjusted to use the BWTP socket easily. Fo=
r that reason, I am leaning towards the belief that BWTP should try to be a=
 superset of unidirectional HTTP.<br>
<br>=C2=A0Paul Prescod<br><br></div></div>

--00151750e4da9b377c046c176512--

From salvatore.loreto@ericsson.com  Thu Jun 11 13:37:52 2009
Return-Path: <salvatore.loreto@ericsson.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 F38D03A6AA2 for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 13:37:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.249
X-Spam-Level: 
X-Spam-Status: No, score=-6.249 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_SE=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 ps3GQpOLtVv4 for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 13:37:50 -0700 (PDT)
Received: from mailgw4.ericsson.se (mailgw4.ericsson.se [193.180.251.62]) by core3.amsl.com (Postfix) with ESMTP id 122633A6ACE for <hybi@ietf.org>; Thu, 11 Jun 2009 13:37:49 -0700 (PDT)
X-AuditID: c1b4fb3e-b7bedae0000062bb-b2-4a316b2449e6
Received: from esealmw127.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw4.ericsson.se (Symantec Mail Security) with SMTP id 06.31.25275.42B613A4; Thu, 11 Jun 2009 22:37:56 +0200 (CEST)
Received: from esealmw129.eemea.ericsson.se ([153.88.254.177]) by esealmw127.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Thu, 11 Jun 2009 22:37:56 +0200
Received: from mail.lmf.ericsson.se ([131.160.11.50]) by esealmw129.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Thu, 11 Jun 2009 22:37:55 +0200
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3]) by mail.lmf.ericsson.se (Postfix) with ESMTP id 9C189244E for <hybi@ietf.org>; Thu, 11 Jun 2009 23:37:55 +0300 (EEST)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 5AFEA219FF for <hybi@ietf.org>; Thu, 11 Jun 2009 23:37:55 +0300 (EEST)
Received: from localhost.localdomain (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 17C35219AA for <hybi@ietf.org>; Thu, 11 Jun 2009 23:37:55 +0300 (EEST)
Message-ID: <4A316B22.5040606@ericsson.com>
Date: Thu, 11 Jun 2009 23:37:54 +0300
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090320)
MIME-Version: 1.0
To: hybi@ietf.org
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-OriginalArrivalTime: 11 Jun 2009 20:37:55.0414 (UTC) FILETIME=[7FC1BF60:01C9EAD4]
X-Brightmail-Tracker: AAAAAA==
Subject: [hybi] draft-loreto-http-bidirectional
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: Thu, 11 Jun 2009 20:37:52 -0000

Hi there,

we have just submitted the following draft:
"Best Practices for the Use of Long Polling and Streaming in 
Bidirectional HTTP"

The draft is a first tentative to describe what does it means to use 
HTTP for Bidirectional communication
and how to better use HTTP, as it exists today, to enable such 
"bidirectional HTTP" using "long polling"
and "HTTP streaming" mechanisms.

until it will appear on the IETF website you can find it here:
http://xmpp.org/internet-drafts/draft-loreto-http-bidirectional-00.txt

we are looking forward to receive your comments, suggestions and 
feedbacks on it

we would like to remind that the preferred venue for discussion of this 
document is the hybi@ietf.org mailing list
(visit <https://www.ietf.org/mailman/listinfo/hybi> for further 
information).

best regards
Sal


-------- Original Message --------
Subject: 	New Version Notification for draft-loreto-http-bidirectional-00
Date: 	Thu, 11 Jun 2009 13:15:57 -0700 (PDT)
From: 	IETF I-D Submission Tool <idsubmission@ietf.org>
To: 	Salvatore.Loreto@ericsson.com
CC: 
salvatore.loreto@ericsson.com,psaintan@cisco.com,gregw@webtide.com,stefano.salsano@uniroma2.it 




A new version of I-D, draft-loreto-http-bidirectional-00.txt has been successfuly submitted by Salvatore Loreto and posted to the IETF repository.

Filename:	 draft-loreto-http-bidirectional
Revision:	 00
Title:		 Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP
Creation_date:	 2009-06-11
WG ID:		 Independent Submission
Number_of_pages: 16

Abstract:
There is widespread interest in using the Hypertext Transfer Protocol
(HTTP) to enable asynchronous or server-initiated communication from
a server to a client as well as from a client to a server.  This
document describes how to better use HTTP, as it exists today, to
enable such "bidirectional HTTP" using "long polling" and "HTTP
streaming" mechanisms.
                                                                                  


The IETF Secretariat.




From gregw@webtide.com  Thu Jun 11 14:47:50 2009
Return-Path: <gregw@webtide.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 539A03A6D24 for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 14:47:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[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 xm6fT--gwqBC for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 14:47:49 -0700 (PDT)
Received: from mail-px0-f175.google.com (mail-px0-f175.google.com [209.85.216.175]) by core3.amsl.com (Postfix) with ESMTP id 7DD153A6D01 for <hybi@ietf.org>; Thu, 11 Jun 2009 14:47:49 -0700 (PDT)
Received: by pxi5 with SMTP id 5so494682pxi.29 for <hybi@ietf.org>; Thu, 11 Jun 2009 14:47:55 -0700 (PDT)
Received: by 10.114.185.12 with SMTP id i12mr4685190waf.16.1244756875227; Thu, 11 Jun 2009 14:47:55 -0700 (PDT)
Received: from ?10.10.1.15? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 3sm529993pxi.169.2009.06.11.14.47.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Jun 2009 14:47:54 -0700 (PDT)
Message-ID: <4A317B86.7060400@webtide.com>
Date: Fri, 12 Jun 2009 07:47:50 +1000
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: Paul Prescod <paul@prescod.net>
References: <4A2F7BB2.5000105@webtide.com>	 <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com>	 <4A30329E.9070000@webtide.com> <1cb725390906111214o1139491k2bd74c0ccc994005@mail.gmail.com>
In-Reply-To: <1cb725390906111214o1139491k2bd74c0ccc994005@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Thu, 11 Jun 2009 21:47:50 -0000

Paul,

with regards as keeping the messages identical to RFC2616, I did consider
this because it would be cool to just work through existing intermediaries.

But the fundamental problem is that because it is request/response
the number of responses must equal the number of requests.  So if you
have traffic that is substantially one way, you end up sending lots
of empty messages the other direction to keep things balanced.  This
degenerates to more-or-less long polling - which we can do today.

I guess there could be an incremental improvement in HTTP long
polling by sending a full pipeline of requests and requiring the
server to examine that incoming pipeline for messages, but there
would be queueing delays and not all intermediaries can handle
pipelines anyway.

Also the websocket guys appear very keen to byte squeeze the packets,
so changing the start-line to include content length was a good
way to achieve this.

Finally, for the sake of debugging, it would be good if a
BWTP protocol packet can be identified as such by inspection without
state.

So that's why I've gone down the path that I have.


But if you think that a pure RFC2616 like approach is worthwhile,
then I'd certainly review and contribute to an alternate alternate
proposal.

cheers


Paul Prescod wrote:
> Could you justify the "non-obvious" changes from RFC2616?
> 
>       The BWTP has been substantially based on HTTP/1.1 and the RFC2616
>     document
>       that specifies it.  The key differences with HTTP/1.1 are:
>         * A BWTP connection cannot be directly established by a client, but
>           must be upgraded from a HTTP connection.
> 
> 
> Okay.
>  
> 
>         * There is no relationship (like request/response) between inbound
>           and outbound messages
> 
> 
> Is this "simplification" worth the cost of being different from RFC2616?
> As we all know, one can implement fire-and-forget on top of
> request/response or vice versa. One could imagine a trivial mod_async
> which merely returns 200 OK to every message before queuing it for
> internal processing. On the client side, async HTTP already exists.
>  
> I also wonder the simplification of the protocol is worth the cost of
> being different for all of the following:
> 
>         * There are no methods or statuses associated with messages. 
> 
>         * Messages may either be completely self describing or rely on meta
>           data associated with the connection that is established during
>     upgrade.
>         * A message content length is included in the message start line
> 
> 
> This one seems necessary:
>  
> 
>         * An orderly close sequence is specified
> 
> 
> WRT:
>  
> 
>         * There is no caching mechanism
> 
> 
> HTTP's caching mechanism is already optional, right?
> 
> One virtue of staying closer to HTTP is that one can easily imagine how
> existing AJAX APIs and code could be adjusted to use the BWTP socket
> easily. For that reason, I am leaning towards the belief that BWTP
> should try to be a superset of unidirectional HTTP.
> 
>  Paul Prescod
> 


From gregw@webtide.com  Thu Jun 11 22:16:30 2009
Return-Path: <gregw@webtide.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 AD2AF3A63CB for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 22:16:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000,  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 jwSfh2A7Epah for <hybi@core3.amsl.com>; Thu, 11 Jun 2009 22:16:29 -0700 (PDT)
Received: from mail-px0-f202.google.com (mail-px0-f202.google.com [209.85.216.202]) by core3.amsl.com (Postfix) with ESMTP id AA1BA3A6A71 for <hybi@ietf.org>; Thu, 11 Jun 2009 22:16:29 -0700 (PDT)
Received: by pxi40 with SMTP id 40so1126381pxi.32 for <hybi@ietf.org>; Thu, 11 Jun 2009 22:16:36 -0700 (PDT)
Received: by 10.115.106.18 with SMTP id i18mr5470080wam.57.1244783795629; Thu, 11 Jun 2009 22:16:35 -0700 (PDT)
Received: from ?10.10.1.15? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 2sm1089383pxi.68.2009.06.11.22.16.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Jun 2009 22:16:35 -0700 (PDT)
Message-ID: <4A31E4AE.3080103@webtide.com>
Date: Fri, 12 Jun 2009 15:16:30 +1000
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: hybi@ietf.org, dev <dev@webtide.com>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com> <4A30329E.9070000@webtide.com> <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com>
In-Reply-To: <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Fri, 12 Jun 2009 05:16:30 -0000

All,

I've put the latest BWTP proposal up on http://bwtp.wikidot.com/

cheers

From salvatore.loreto@ericsson.com  Tue Jun 16 04:59:14 2009
Return-Path: <salvatore.loreto@ericsson.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 3D33D3A6A87 for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 04:59:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.793
X-Spam-Level: 
X-Spam-Status: No, score=-6.793 tagged_above=-999 required=5 tests=[AWL=-0.544, BAYES_00=-2.599, HELO_EQ_SE=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 k2H4Iy4+-HIn for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 04:59:13 -0700 (PDT)
Received: from mailgw4.ericsson.se (mailgw4.ericsson.se [193.180.251.62]) by core3.amsl.com (Postfix) with ESMTP id 697053A684A for <hybi@ietf.org>; Tue, 16 Jun 2009 04:59:12 -0700 (PDT)
X-AuditID: c1b4fb3e-b7b1dae000006c99-e2-4a3788d872ca
Received: from esealmw127.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw4.ericsson.se (Symantec Mail Security) with SMTP id 27.C1.27801.8D8873A4; Tue, 16 Jun 2009 13:58:16 +0200 (CEST)
Received: from esealmw127.eemea.ericsson.se ([153.88.254.175]) by esealmw127.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Tue, 16 Jun 2009 13:58:07 +0200
Received: from mail.lmf.ericsson.se ([131.160.11.50]) by esealmw127.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Tue, 16 Jun 2009 13:58:07 +0200
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3]) by mail.lmf.ericsson.se (Postfix) with ESMTP id 815A824E3; Tue, 16 Jun 2009 14:58:07 +0300 (EEST)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 40560219FF; Tue, 16 Jun 2009 14:58:07 +0300 (EEST)
Received: from localhost.localdomain (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id BDA2A219CD; Tue, 16 Jun 2009 14:58:06 +0300 (EEST)
Message-ID: <4A3788CE.3010406@ericsson.com>
Date: Tue, 16 Jun 2009 14:58:06 +0300
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090320)
MIME-Version: 1.0
To: Greg Wilkins <gregw@webtide.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com>
In-Reply-To: <4A3116F4.9040208@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-OriginalArrivalTime: 16 Jun 2009 11:58:07.0593 (UTC) FILETIME=[B66EAD90:01C9EE79]
X-Brightmail-Tracker: AAAAAA==
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Tue, 16 Jun 2009 11:59:14 -0000

Hi Greg,

I would say that the main difference with the WebSocket protocol is that 
BWTP includes META-DATA
that make BWTP working in a similar way to HTTP.
It would be interesting understand why WebSocket does not have defined 
'meta';
if there is any specific reason why there aren't.
Any idea?
is there any reason from a browser prospective to avoid the inclusion of 
META-DATA in this kind of protocol?

maybe that a question for Ian!

one question more relate to the draft. In Section 1.4 there is the 
following statement:
"/The upgrade request and response may define meta data defaults for all 
messages on a BWTP connection, such as content-type, character-set, 
content-encoding, Location and Origin. Individual messages my override 
any or all of these defaults as well as provide additional meta-data 
that does not have defaults./"
it is not clear if it would be possible only override the defaults with 
ad-hoc per message, or it would also possible send messages without any 
META-DATA.
In the latter case then the BWTP could also work in a WebSocket mode.

Greg Wilkins wrote:
> Kris,
>
> The intent of BWTP is that eventually intermediaries would be
> updated to understand it and even participate in the connection (for
> example initiating an orderly close).
>   
the fact that an intermediaries would understand the protocol and even 
participate in the connection
is an interesting feature, that however needs to be investigate 
especially the security considerations and described more in details .

Furthermore  I have  some doubts  on the possibility  that "/any 
intermediary MAY initiate an orderly shutdown of a BWTP connection by 
sending a message with a "Connection" header field with a value of 
"Close"/".
> However, if the proxy does not support the upgrade request,
> then BWTP would also able to be sent over a tunnel established
> by a CONNECT.
>
> Note that this is the same for the websocket when it tries to
> do an upgrade but encounters a transparent proxy that does not
> support the upgrade.
>   
It would be also interesting discuss in the draft the CONNECT scenario, 
and explicitly say that in this case
the proxy that does not support upgrade can not participate in the 
connection.

btw, the response to a GET with an Upgrade header, should contain an 
Upgrade header as well.
you should correct the example in Section 8.1.2 in the following way:

|HTTP/1.1 101 Bidirectional Web Transfer Protocol
||Upgrade: BWTP/1.0|
|BWTP-Content-Origin: the.origin.com
BWTP-Content-Type: text/plain;charset=utf-8|||

> However, because BWTP is so similar to HTTP, the work needed
> to upgrade a proxy should be minimal.
>   
right the work to upgrade a proxy would be minimal, moreover having the 
proxy recognizing
the protocol would also help the bidirectional communication coming 
through it.

cheers
Sal

> cheers
>
>
> Kris Zyp wrote:
>   
>> Greg Wilkins wrote:
>>     
>>> + Because of it's similarity to HTTP, it is intended that existing
>>> HTTP clients, servers and intermediaries will be able to be
>>> minimally updated to support this protocol. This will not require
>>> entirely new protocol libraries to be developed.   Existing
>>> development and analysis tools will also be able to be easily
>>> updated, plus the protocol is mostly human readable.
>>>       
>> Maybe I missing something about this in discussions, but I thought one
>> of the core ideas of WebSockets was to use CONNECT to
>> tunnel through existing proxies. Is there hope that BWTP would somehow
>> be properly handled by existing intermediaries, or would it require an
>> update to proxies? It certainly seems that if it is possible to build
>> the protocol such that it will work over existing proxies, that would
>> be greatly preferable. If this won't work across in current proxied
>> environments, uptake will be much slower (if at all), won't it?
>>
>>     
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>   


From gregw@webtide.com  Tue Jun 16 06:28:55 2009
Return-Path: <gregw@webtide.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 415403A6882 for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 06:28:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000,  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 fwTPgNrVFg-s for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 06:28:54 -0700 (PDT)
Received: from mail-pz0-f204.google.com (mail-pz0-f204.google.com [209.85.222.204]) by core3.amsl.com (Postfix) with ESMTP id 3D0953A6A76 for <hybi@ietf.org>; Tue, 16 Jun 2009 06:28:54 -0700 (PDT)
Received: by pzk42 with SMTP id 42so3562858pzk.29 for <hybi@ietf.org>; Tue, 16 Jun 2009 06:28:38 -0700 (PDT)
Received: by 10.114.57.6 with SMTP id f6mr13602177waa.223.1245158916976; Tue, 16 Jun 2009 06:28:36 -0700 (PDT)
Received: from ?10.10.1.15? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 10sm7291612pxi.157.2009.06.16.06.28.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Jun 2009 06:28:36 -0700 (PDT)
Message-ID: <4A379DFF.8010807@webtide.com>
Date: Tue, 16 Jun 2009 23:28:31 +1000
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com>
In-Reply-To: <4A3788CE.3010406@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Tue, 16 Jun 2009 13:28:55 -0000

Salvatore Loreto wrote:
> Hi Greg,
> 
> I would say that the main difference with the WebSocket protocol is that
> BWTP includes META-DATA
> that make BWTP working in a similar way to HTTP.

I would agree that this is indeed the key substantive difference between
the proposals, plus the elements that flow from the ability to have
standard headers (eg support for ranges, content encodings etc.).

Another difference is the recognition of intermediaries as potential
active participants in a connection.

There are also significant differences in the "style" of the
protocol which can have an impact of the protocols acceptance
and ease of implementation.


> It would be interesting understand why WebSocket does not have defined
> 'meta';
> if there is any specific reason why there aren't.
> Any idea?

I did post a proposal to define a websocket frame type that would
carry mime encoded content.   However, I don't think the websocket
authors accept meta-data as a requirement and appear to advocate
that meta-data could be transported within the payload by mutual
assumption between client and server.


> is there any reason from a browser prospective to avoid the inclusion of
> META-DATA in this kind of protocol?

One of the objections of meta data that have I tried to address
in BWTP was that it can often be verbose and redundant.

For that reason, I have proposed move the Content-Length
to the start-line and have a default mechanism so that common
meta-data need only be sent once per connection.

I'm not sure if there are other objections - Ian?


> one question more relate to the draft. In Section 1.4 there is the
> following statement:
> "/The upgrade request and response may define meta data defaults for all
> messages on a BWTP connection, such as content-type, character-set,
> content-encoding, Location and Origin. Individual messages my override
> any or all of these defaults as well as provide additional meta-data
> that does not have defaults./"
> it is not clear if it would be possible only override the defaults with
> ad-hoc per message, or it would also possible send messages without any
> META-DATA.
> In the latter case then the BWTP could also work in a WebSocket mode.

As written, the only way to override default meta-data is to supply
alternative meta-data (with potentially a null value).
Note that it is always possible to change the defaults for the connection
by sending new defaults with any message (I'm not sure this is clear in
the draft - but I will make it so).

Note that I would say that WebSocket also has meta-data.  Just that
it is fixed and cannot be overridden.  For example the plain
text UTF-8 datagram is the meta-data default for the sentinel
framing of websocket.

cheers




From ian@hixie.ch  Tue Jun 16 10:17:32 2009
Return-Path: <ian@hixie.ch>
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 817FC3A6D8B for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 10:17:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.146
X-Spam-Level: 
X-Spam-Status: No, score=-6.146 tagged_above=-999 required=5 tests=[AWL=-3.547, 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 OA5eywnM9g0W for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 10:17:31 -0700 (PDT)
Received: from looneymail-a3.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 6B5A73A6BEF for <hybi@ietf.org>; Tue, 16 Jun 2009 10:17:31 -0700 (PDT)
Received: from hixie.dreamhostps.com (hixie.dreamhost.com [208.113.210.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a3.g.dreamhost.com (Postfix) with ESMTP id 4E0A527B4D; Tue, 16 Jun 2009 10:17:42 -0700 (PDT)
Date: Tue, 16 Jun 2009 17:17:41 +0000 (UTC)
From: Ian Hickson <ian@hixie.ch>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
In-Reply-To: <4A3788CE.3010406@ericsson.com>
Message-ID: <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Cc: hybi@ietf.org
Subject: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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: Tue, 16 Jun 2009 17:17:32 -0000

On Tue, 16 Jun 2009, Salvatore Loreto wrote:
>
> It would be interesting understand why WebSocket does not have defined 
> 'meta'; if there is any specific reason why there aren't.

The WebSocket protocol is designed on the principle that there should be 
minimal framing (the only framing that exists is to make the protocol 
frame-based instead of stream-based, and to support a distinction between 
Unicode text and binary frames). It is expected that metadata would be 
layered on top of WebSocket by the application layer, in the same way that 
metadata is layered on top of TCP/IP by the application layer (HTTP).

Conceptually, WebSocket is really just a layer on top of TCP/IP that adds 
a Web "origin"-based security model for browsers; adds an addressing and 
protocol naming mechanism to support multiple services on one port and 
multiple host names on one IP address; and layers a framing mechanism on 
top of TCP to get back to the IP packet mechanism that TCP is built on, 
but without length limits. Other than that, it adds nothing. Basically it 
is intended to be as close as possible to just exposing raw TCP/IP to 
script as possible given the constraints of the Web. (It's also designed 
in such a way that its servers can share a port with HTTP servers, by 
having its handshake be a valid HTTP Upgrade handshake also.)

HTH,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

From ian@hixie.ch  Tue Jun 16 10:20:54 2009
Return-Path: <ian@hixie.ch>
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 616833A6DA6 for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 10:20:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.959
X-Spam-Level: 
X-Spam-Status: No, score=-5.959 tagged_above=-999 required=5 tests=[AWL=-3.360, 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 1Cd2FxrvT9T3 for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 10:20:53 -0700 (PDT)
Received: from looneymail-a3.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 7A5573A6DA5 for <hybi@ietf.org>; Tue, 16 Jun 2009 10:20:53 -0700 (PDT)
Received: from hixie.dreamhostps.com (hixie.dreamhost.com [208.113.210.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a3.g.dreamhost.com (Postfix) with ESMTP id 0C3E427B8B; Tue, 16 Jun 2009 10:21:00 -0700 (PDT)
Date: Tue, 16 Jun 2009 17:20:59 +0000 (UTC)
From: Ian Hickson <ian@hixie.ch>
To: Greg Wilkins <gregw@webtide.com>
In-Reply-To: <4A379DFF.8010807@webtide.com>
Message-ID: <Pine.LNX.4.62.0906161718470.16244@hixie.dreamhostps.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <4A379DFF.8010807@webtide.com>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Tue, 16 Jun 2009 17:20:54 -0000

On Tue, 16 Jun 2009, Greg Wilkins wrote:
> 
> > is there any reason from a browser prospective to avoid the inclusion 
> > of META-DATA in this kind of protocol?
> 
> [...]
> 
> I'm not sure if there are other objections - Ian?

It would be best to ask browser vendors directly, but off-hand I can't 
think of any reasons other than the necessary added complexity (parsing 
the metadata, handling exposing it to scripts, defining all the error 
handling to ensure bogus servers are handled predictably, etc).


> Note that I would say that WebSocket also has meta-data.  Just that it 
> is fixed and cannot be overridden.  For example the plain text UTF-8 
> datagram is the meta-data default for the sentinel framing of websocket.

Insofar as framing is metadata, yes.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

From gregw@webtide.com  Tue Jun 16 16:07:35 2009
Return-Path: <gregw@webtide.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 3AF5828C0E5 for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 16:07:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[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 LvaebGQ4882B for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 16:07:34 -0700 (PDT)
Received: from mail-px0-f193.google.com (mail-px0-f193.google.com [209.85.216.193]) by core3.amsl.com (Postfix) with ESMTP id 7B8173A6AA8 for <hybi@ietf.org>; Tue, 16 Jun 2009 16:07:34 -0700 (PDT)
Received: by pxi31 with SMTP id 31so2073377pxi.29 for <hybi@ietf.org>; Tue, 16 Jun 2009 16:07:43 -0700 (PDT)
Received: by 10.114.58.15 with SMTP id g15mr14587898waa.102.1245193663791; Tue, 16 Jun 2009 16:07:43 -0700 (PDT)
Received: from ?10.10.1.15? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 6sm7120864pxi.61.2009.06.16.16.07.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Jun 2009 16:07:43 -0700 (PDT)
Message-ID: <4A3825B9.10607@webtide.com>
Date: Wed, 17 Jun 2009 09:07:37 +1000
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: Ian Hickson <ian@hixie.ch>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <4A379DFF.8010807@webtide.com> <Pine.LNX.4.62.0906161718470.16244@hixie.dreamhostps.com>
In-Reply-To: <Pine.LNX.4.62.0906161718470.16244@hixie.dreamhostps.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Tue, 16 Jun 2009 23:07:35 -0000

Ian Hickson wrote:
> On Tue, 16 Jun 2009, Greg Wilkins wrote:
>>> is there any reason from a browser prospective to avoid the inclusion 
>>> of META-DATA in this kind of protocol?
>> [...]
>>
>> I'm not sure if there are other objections - Ian?
> 
> It would be best to ask browser vendors directly, but off-hand I can't 
> think of any reasons other than the necessary added complexity (parsing 
> the metadata, handling exposing it to scripts, defining all the error 
> handling to ensure bogus servers are handled predictably, etc).

Note that I think the discussion of what should be exposed/changed in
the API is a different one to the transport protocol.

I think changing the API is something that can happen more easily over
time than changing network infrastructure.

I think trying to future proof and API for unknown future use-cases
mostly leads to strange APIs, while future proofing transport protocols
to future use-cases is good practise.

For example, already the websocket protocol proposal has more
capabilities than the API supports.  With BWTP I'm proposing that
this additional capability be taken to be equally capable as HTTP.


>> Note that I would say that WebSocket also has meta-data.  Just that it 
>> is fixed and cannot be overridden.  For example the plain text UTF-8 
>> datagram is the meta-data default for the sentinel framing of websocket.
> 
> Insofar as framing is metadata, yes.

I was really refering to an implied text/plain;charset=UTF-8 content type
with no content-encoding.

cheers




From ian@hixie.ch  Tue Jun 16 17:13:33 2009
Return-Path: <ian@hixie.ch>
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 DA35A3A6881 for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 17:13:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.791
X-Spam-Level: 
X-Spam-Status: No, score=-5.791 tagged_above=-999 required=5 tests=[AWL=-3.192, 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 I9jeUJty--wT for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 17:13:33 -0700 (PDT)
Received: from looneymail-a1.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 13E8E3A6849 for <hybi@ietf.org>; Tue, 16 Jun 2009 17:13:32 -0700 (PDT)
Received: from hixie.dreamhostps.com (hixie.dreamhost.com [208.113.210.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a1.g.dreamhost.com (Postfix) with ESMTP id 2F20915D792; Tue, 16 Jun 2009 17:13:44 -0700 (PDT)
Date: Wed, 17 Jun 2009 00:13:43 +0000 (UTC)
From: Ian Hickson <ian@hixie.ch>
To: Greg Wilkins <gregw@webtide.com>
In-Reply-To: <4A3825B9.10607@webtide.com>
Message-ID: <Pine.LNX.4.62.0906170012370.16244@hixie.dreamhostps.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <4A379DFF.8010807@webtide.com> <Pine.LNX.4.62.0906161718470.16244@hixie.dreamhostps.com> <4A3825B9.10607@webtide.com>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 17 Jun 2009 00:13:33 -0000

On Wed, 17 Jun 2009, Greg Wilkins wrote:
> >>> 
> >> Note that I would say that WebSocket also has meta-data.  Just that 
> >> it is fixed and cannot be overridden.  For example the plain text 
> >> UTF-8 datagram is the meta-data default for the sentinel framing of 
> >> websocket.
> > 
> > Insofar as framing is metadata, yes.
> 
> I was really refering to an implied text/plain;charset=UTF-8 content 
> type with no content-encoding.

I don't really think it's correct to think of the WebSocket system as 
implying such a type; you could just as easily be sending something else 
like JSON, or XML, or whatever. It's just that the basic data structure is 
Unicode instead of octets.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

From jamie@shareable.org  Tue Jun 16 18:24:50 2009
Return-Path: <jamie@shareable.org>
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 AAC1E3A6DC0 for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 18:24:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.583
X-Spam-Level: 
X-Spam-Status: No, score=-6.583 tagged_above=-999 required=5 tests=[AWL=-3.984, 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 CGtLbuNXhkd2 for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 18:24:49 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id B63E03A6B55 for <hybi@ietf.org>; Tue, 16 Jun 2009 18:24:49 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1MGjtV-0002QP-Og; Wed, 17 Jun 2009 02:24:53 +0100
Date: Wed, 17 Jun 2009 02:24:53 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Pieter Hintjens <ph@imatix.com>
Message-ID: <20090617012453.GQ11893@shareable.org>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com> <4A30329E.9070000@webtide.com> <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 17 Jun 2009 01:24:50 -0000

Pieter Hintjens wrote:
> Fair enough.  Would it be correct to describe this as an asynchronous
> message framing protocol designed to be layered on top of HTTP?

No, because it is incompatible with HTTP.

It will not work over existing proxies, it will not work over port 80
on some parts of the existing internet, and it will not work through a
general purpose HTTP server which passes things to per-URL handlers,
like most HTTP servers do.

But those are all solvable problems :-)

> Thus, the complex one-off work (like authentication) is done using
> synchronous, pedantic HTTP while the high volume work (message
> transfer) is done using fast, asynchronous BWTP?  Presumably after
> switching to BWTP, one does not return to HTTP.
> 
> This is a good pattern IMO.

I agree, except by dropping HTTP entirely after the negotiation, it
does implicitly suggests you need multiple connections if the complex
things, like authentication, need to be different for separate
back-end processes.

That's probably not a common scenario, and most protocols work like
that, so that's fine.  (But as an observation, when it occurs it'll be
less network-efficient than pipelined HTTP.)

Unfortunately, that prevents client implementations from automatically
sharing connections between multiple API instances.  That seems to
inherit an awkward (mis-)feature of the WebSocket API: multiple
applications running side by side can either not share connections at
all, or do so by using a different API entirely ("workers"), a
situation which will discourage network efficiency.

> My proposal would be to use a wiki, where the text can be edited
> collaboratively, and where we can track issues and todos.  I usually
> use wikidot.com for such things (e.g. www.restms.org).  Glad to set
> that up if you need it.

Is there a system for annotating the document with comments?

-- Jamie

From jamie@shareable.org  Tue Jun 16 18:30:21 2009
Return-Path: <jamie@shareable.org>
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 9E2B13A6DC0 for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 18:30:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.384
X-Spam-Level: 
X-Spam-Status: No, score=-6.384 tagged_above=-999 required=5 tests=[AWL=-3.785, 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 Fy527rCffQp3 for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 18:30:20 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 915563A6DC1 for <hybi@ietf.org>; Tue, 16 Jun 2009 18:30:20 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1MGjyv-0002W3-Sm; Wed, 17 Jun 2009 02:30:29 +0100
Date: Wed, 17 Jun 2009 02:30:29 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Pieter Hintjens <ph@imatix.com>
Message-ID: <20090617013029.GR11893@shareable.org>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com> <4A30329E.9070000@webtide.com> <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com> <4A311C96.5010605@webtide.com> <5821ea240906110926p4ee80bb9s464d575e12fcc52f@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5821ea240906110926p4ee80bb9s464d575e12fcc52f@mail.gmail.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 17 Jun 2009 01:30:21 -0000

Pieter Hintjens wrote:
> Presumably we could do a kind of BWTP emulation over HTTP, for
> prototyping or proof of concept.

Far more useful: For actual deployability on the real port 80 internet.

You can't expect Upgrade to work on port 80 on a substantial portion
of the internet (possibly growing, due to 3G mobile phones), and a
good number of places don't allow access to general internet services
via any port other than 80.

BWTP or anything else "emulated" over HTTP is a way to sort that out.

Of course then it is just another protocol over Comet (etc.), with
sucky performance.

So something of great value would be a way to Upgrade to the proper
protocol over the real internet in a way works despite transparent
proxies on port 80, to the extent that it's possible, and work
properly when it is not possible to upgrade.

> FWIW, I've been trying to get this pattern into AMQP (www.amqp.org)
> for about two years, without success.

The "authenticate first then do fast messaging" pattern is extremely
common.

I'm not familiar with AMQP's details.  In what way does it not fit that
pattern?

Or do you mean emulation over HTTP?  I think I saw an implementation
of AMQP over HTTP advertised not long ago.

-- Jamie

From jamie@shareable.org  Tue Jun 16 19:09:05 2009
Return-Path: <jamie@shareable.org>
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 C136E3A67B2 for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 19:09:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.204
X-Spam-Level: 
X-Spam-Status: No, score=-6.204 tagged_above=-999 required=5 tests=[AWL=-3.605, 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 g0TJoAwnJ1Jp for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 19:09:04 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id EB63E3A6778 for <hybi@ietf.org>; Tue, 16 Jun 2009 19:08:42 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1MGka3-0002nW-PG; Wed, 17 Jun 2009 03:08:51 +0100
Date: Wed, 17 Jun 2009 03:08:51 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20090617020851.GS11893@shareable.org>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com> <4A30329E.9070000@webtide.com> <1cb725390906111214o1139491k2bd74c0ccc994005@mail.gmail.com> <4A317B86.7060400@webtide.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4A317B86.7060400@webtide.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 17 Jun 2009 02:09:05 -0000

Greg Wilkins wrote:
> So if you have traffic that is substantially one way, you end up
> sending lots of empty messages the other direction to keep things
> balanced.

It's not immediately obvious, but BWTP will send empty messages in the
other direction anyway.

They are called TCP ACKs, and you'd be surprised how little difference
a few "200 OK" lines makes per ACK, if they are piggybacked properly.

(Of course they aren't always piggybacked properly.)

I do like the idea of responses being optional though.  It's just
nicer, when you are layering another protocol on top of the messaging
service anyway - and the other protocol probably has it's _own_ form
of replies.

In my own bidirectional-HTTP-like implementation, the server always
generates a response, but each request has a field indicating if the
response should be sent or not.  (The same field is used to coordinate
out-of-order responses in fact).

> This degenerates to more-or-less long polling - which we can do
> today.

Not really.  With long polling, you need two sockets: one to send
messages, and one to receive them on.  Bidirectional messaging is an
improvement already.

> I guess there could be an incremental improvement in HTTP long
> polling by sending a full pipeline of requests and requiring the
> server to examine that incoming pipeline for messages, but there
> would be queueing delays and not all intermediaries can handle
> pipelines anyway.

I'm curious about that.  What known issues are there with
intermediaries and pipelines?  I'm aware of lots of problems with
origin servers and pipelines, but not intermediaries.

I guess known issues should go in the Comet best practices document?

> Finally, for the sake of debugging, it would be good if a BWTP
> protocol packet can be identified as such by inspection without
> state.

That makes good sense, I like that.

> But if you think that a pure RFC2616 like approach is worthwhile,
> then I'd certainly review and contribute to an alternate alternate
> proposal.

There are several problems and limitations with HTTP and pipelined
HTTP that this has a chance to fix, not least what to do on errors,
and what to do when a connection has been idle for a while.

Here's a couple of RFC2616 issues which are, imho, best avoided when
reinventing it bidirectionally:

RFC2616 specifies that under certain conditions, a connection must be
terminated _abruptly_ when an error response is sent to certain
requests like POST, to stop a potentially large request from being
sent whole.  Any pipelined requests after it will be lost, but you
cannot know which ones the server received and started processing.

You don't really want that here: it's much better that there's a way
to halt one request without breaking the connection for other requests.

When sending a request to an RFC2616 idle connection (say after 30
seconds), you don't know if the server has decided to close it or not.
So on sending, you might get a connection error, and then you don't
know if your request was processed or not, and whether it's safe to
repeated it.  There are other reasons why you might get the same
connection error, such as network faults and NAT timeouts.

For that reason, even persistent HTTP cannot be used for many requests
safely and automatically, so clients don't.  E.g. for POST.  Let alone
pipelined HTTP, which has the same problem in more cases.

You have, thankfully, already addressed the orderly shutdown problem.
Real HTTP servers use a lingering half-closed socket, to ensure the
last response will actually reach the client if the client pipelined
another request.  This is necessary for reliable behaviour (due to a
TCP quirk), yet not mentioned in RFC2616.

All messages over BWTP would all fall into the category of not being
safe to repeat automatically by the BWTP implementation.  Now, because
BWTP is intended for "TCP-like" applications, they will already be
aware of the possibility of broken connections and such things, and
have their own method of recovering, so it's not such a big problem.

But that means you cannot simply layer standard _HTTP_ requests over
BWTP safely.  Only application-specific protocols which know what to
expect can use it, even though they have access to HTTP-style message
metadata.

It _is_ possible to layer standard HTTP over BWTP safely, and to avoid
the same problems in BWTP-aware applications (making the applications
simpler).  But not by taking RFC2616 and simply making it bidirectional.

> > One virtue of staying closer to HTTP is that one can easily imagine how
> > existing AJAX APIs and code could be adjusted to use the BWTP socket
> > easily. For that reason, I am leaning towards the belief that BWTP
> > should try to be a superset of unidirectional HTTP.

I like that idea a lot (I'll help make it possible), but I also like
the idea of having the option to transport simple non-HTTP messages too.

See above about why you have to be careful about layering HTTP
messages automatically over anything else that dabbles in persistence
and pipelining.  There are assumptions about what behaviour to expect,
and what requests are safe to repeat automatically in the protocol
implementation, and when to do it.  AJAX apps expect to call
XmlHttpRequest and not have to do things like recover from
broken/timed-out connections - they expect the protocol implementation
to sort it out, but in a safe way.

-- Jamie

From jamie@shareable.org  Tue Jun 16 19:24:05 2009
Return-Path: <jamie@shareable.org>
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 12EEA3A6880 for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 19:24:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.04
X-Spam-Level: 
X-Spam-Status: No, score=-6.04 tagged_above=-999 required=5 tests=[AWL=-3.441,  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 x-xH7dChEYRD for <hybi@core3.amsl.com>; Tue, 16 Jun 2009 19:24:04 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 6866C3A67B2 for <hybi@ietf.org>; Tue, 16 Jun 2009 19:23:45 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1MGkod-0002vR-ST; Wed, 17 Jun 2009 03:23:55 +0100
Date: Wed, 17 Jun 2009 03:23:55 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Pieter Hintjens <ph@imatix.com>
Message-ID: <20090617022355.GT11893@shareable.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: [hybi] Bidirectional protocols over port 80 - making it work everywhere
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, 17 Jun 2009 02:24:05 -0000

Jamie Lokier wrote:
> You can't expect Upgrade to work on port 80 on a substantial portion
> of the internet (possibly growing, due to 3G mobile phones), and a
> good number of places don't allow access to general internet services
> via any port other than 80.
> 
> BWTP or anything else "emulated" over HTTP is a way to sort that out.
> 
> Of course then it is just another protocol over Comet (etc.), with
> sucky performance.
> 
> So something of great value would be a way to Upgrade to the proper
> protocol over the real internet in a way works despite transparent
> proxies on port 80, to the extent that it's possible, and work
> properly when it is not possible to upgrade.

By the way, I've been working on a solution to this exact problem.
There might actually be one which doesn't involve trying to guess
which proxies there are in the way.

I don't have a full solution yet, so think about how it might work and
help me out.

It's similar to Greg's idea of BWTP proxy involvement.

We use HTTP proxy involvement.

We start by "emulating" a bidirectional protocol over HTTP,
Comet-style, but include a specific header which means "if you
recognise this header, you may 'lift' the embedded bidirectional
protocol out of it's Comet-style framing and handle it directly in
it's native framing".

Proxies which don't recognise the header will process the HTTP
normally, and it will just work with Comet-style behaviour.

Proxies which do recognise the header will intercept the embedded
protocol and convert it to something which works better, over a single
socket upstream (eventually).

If the Comet-style protocol consisted of a "long POST", with an
infinitely long request and infinitely long response, there would be
no problem.  The HTTP part would just be an initial header.

However, you can't do that: many HTTP implementations don't permit
simultaneous request and response data (even though it's allowed and
some do permit it - I've tried).  So, in general you have two
connections with Comet.  One's the long-GET/POST for server-initiated
messages, and one is for client-initiated messages, roughly speaking.
(You may have tricks like alternating between them for keepalive).

The tricky bit will be finding a way for a participating proxy to lift
the bidirectional protocol out of those two connections, into a single
connection.

Fun, but it might just work over the whole internet.

Especially if we follow the guidelines on good Comet implementation
for the HTTP framing.

I'm going to try implementing that and see where it leads.

-- Jamie

From salvatore.loreto@ericsson.com  Wed Jun 17 00:35:58 2009
Return-Path: <salvatore.loreto@ericsson.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 F242E3A6881 for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 00:35:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.684
X-Spam-Level: 
X-Spam-Status: No, score=-6.684 tagged_above=-999 required=5 tests=[AWL=-0.435, BAYES_00=-2.599, HELO_EQ_SE=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 Yzy1GWpR6rRs for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 00:35:57 -0700 (PDT)
Received: from mailgw3.ericsson.se (mailgw3.ericsson.se [193.180.251.60]) by core3.amsl.com (Postfix) with ESMTP id A8DC53A6816 for <hybi@ietf.org>; Wed, 17 Jun 2009 00:35:56 -0700 (PDT)
X-AuditID: c1b4fb3c-b7b0bae00000673a-32-4a389ce071eb
Received: from esealmw126.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw3.ericsson.se (Symantec Mail Security) with SMTP id D4.6B.26426.0EC983A4; Wed, 17 Jun 2009 09:36:00 +0200 (CEST)
Received: from esealmw126.eemea.ericsson.se ([153.88.254.174]) by esealmw126.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Wed, 17 Jun 2009 09:35:58 +0200
Received: from mail.lmf.ericsson.se ([131.160.11.50]) by esealmw126.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Wed, 17 Jun 2009 09:35:58 +0200
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3]) by mail.lmf.ericsson.se (Postfix) with ESMTP id 9F77124DF; Wed, 17 Jun 2009 10:35:58 +0300 (EEST)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 6064E219FF; Wed, 17 Jun 2009 10:35:58 +0300 (EEST)
Received: from localhost.localdomain (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 09781219AA; Wed, 17 Jun 2009 10:35:57 +0300 (EEST)
Message-ID: <4A389CDD.3070309@ericsson.com>
Date: Wed, 17 Jun 2009 10:35:57 +0300
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090320)
MIME-Version: 1.0
To: Ian Hickson <ian@hixie.ch>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com>
In-Reply-To: <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-OriginalArrivalTime: 17 Jun 2009 07:35:58.0848 (UTC) FILETIME=[41C86800:01C9EF1E]
X-Brightmail-Tracker: AAAAAA==
Cc: hybi@ietf.org
Subject: Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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, 17 Jun 2009 07:35:58 -0000

Ian Hickson wrote:
> On Tue, 16 Jun 2009, Salvatore Loreto wrote:
>   
>> It would be interesting understand why WebSocket does not have defined 
>> 'meta'; if there is any specific reason why there aren't.
>>     
>
> The WebSocket protocol is designed on the principle that there should be 
> minimal framing (the only framing that exists is to make the protocol 
> frame-based instead of stream-based, and to support a distinction between 
> Unicode text and binary frames). It is expected that metadata would be 
> layered on top of WebSocket by the application layer, in the same way that 
> metadata is layered on top of TCP/IP by the application layer (HTTP).
>   
I don't see any minimal framing requirement from the requirements list 
you sent on this list a couple
of months ago:
http://www.ietf.org/mail-archive/web/hybi/current/msg00007.html

actually, in theory also BWTP meets all the requirements you have listed 
in that mail.
> Conceptually, WebSocket is really just a layer on top of TCP/IP that adds 
> a Web "origin"-based security model for browsers; 
the problem here is that WebSocket are not built directly on top of TCP/IP,
but it tries to reuse the HTTP infrastructure to in somehow perform a 
downgrade from the HTTP protocol to
the TCP protocol and then start to build on top of it.
So IMHO the protocol should try to interwork in a fair way with the 
existent HTTP infrastructure,
asking for as minimal as possible update to the elements present in that 
infrastructure.

regards
Sal

> adds an addressing and 
> protocol naming mechanism to support multiple services on one port and 
> multiple host names on one IP address; and layers a framing mechanism on 
> top of TCP to get back to the IP packet mechanism that TCP is built on, 
> but without length limits. Other than that, it adds nothing. 
> Basically it 
> is intended to be as close as possible to just exposing raw TCP/IP to 
> script as possible given the constraints of the Web. (It's also designed 
> in such a way that its servers can share a port with HTTP servers, by 
> having its handshake be a valid HTTP Upgrade handshake also.)
>
> HTH,
>   


From salvatore.loreto@ericsson.com  Wed Jun 17 00:45:28 2009
Return-Path: <salvatore.loreto@ericsson.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 0C0623A6C73 for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 00:45:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.612
X-Spam-Level: 
X-Spam-Status: No, score=-6.612 tagged_above=-999 required=5 tests=[AWL=-0.363, BAYES_00=-2.599, HELO_EQ_SE=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 fQgnlXZX5Z9z for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 00:45:27 -0700 (PDT)
Received: from mailgw4.ericsson.se (mailgw4.ericsson.se [193.180.251.62]) by core3.amsl.com (Postfix) with ESMTP id A18E33A6C27 for <hybi@ietf.org>; Wed, 17 Jun 2009 00:45:25 -0700 (PDT)
X-AuditID: c1b4fb3e-b7b1dae000006c99-fb-4a389efa75f3
Received: from esealmw128.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw4.ericsson.se (Symantec Mail Security) with SMTP id 10.FB.27801.AFE983A4; Wed, 17 Jun 2009 09:44:59 +0200 (CEST)
Received: from esealmw126.eemea.ericsson.se ([153.88.254.170]) by esealmw128.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Wed, 17 Jun 2009 09:44:09 +0200
Received: from mail.lmf.ericsson.se ([131.160.11.50]) by esealmw126.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Wed, 17 Jun 2009 09:44:09 +0200
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3]) by mail.lmf.ericsson.se (Postfix) with ESMTP id 0F32624DC; Wed, 17 Jun 2009 10:44:09 +0300 (EEST)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id CE33F219FF; Wed, 17 Jun 2009 10:44:08 +0300 (EEST)
Received: from localhost.localdomain (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 799B2219AA; Wed, 17 Jun 2009 10:44:08 +0300 (EEST)
Message-ID: <4A389EC8.3020709@ericsson.com>
Date: Wed, 17 Jun 2009 10:44:08 +0300
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090320)
MIME-Version: 1.0
To: Greg Wilkins <gregw@webtide.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <4A379DFF.8010807@webtide.com> <Pine.LNX.4.62.0906161718470.16244@hixie.dreamhostps.com> <4A3825B9.10607@webtide.com>
In-Reply-To: <4A3825B9.10607@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-OriginalArrivalTime: 17 Jun 2009 07:44:09.0289 (UTC) FILETIME=[661BC390:01C9EF1F]
X-Brightmail-Tracker: AAAAAA==
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 17 Jun 2009 07:45:28 -0000

Greg Wilkins wrote:
> Ian Hickson wrote:
>   
>> On Tue, 16 Jun 2009, Greg Wilkins wrote:
>>     
>>>> is there any reason from a browser prospective to avoid the inclusion 
>>>> of META-DATA in this kind of protocol?
>>>>         
>>> [...]
>>>
>>> I'm not sure if there are other objections - Ian?
>>>       
>> It would be best to ask browser vendors directly, but off-hand I can't 
>> think of any reasons other than the necessary added complexity (parsing 
>> the metadata, handling exposing it to scripts, defining all the error 
>> handling to ensure bogus servers are handled predictably, etc).
>>     
>
> Note that I think the discussion of what should be exposed/changed in
> the API is a different one to the transport protocol.
>   
I tend to agree with Greg, on this point.
Here we should only focus on the transport protocol, and try to design a 
good protocol that will meet the requirement
"/to provide two-way communication from a Web page in a clean way/"
where the clean way, I think should be read as in a way that does not 
destroy and it is compatible with the HTTP infrastructure.

regards
Sal

From gregw@webtide.com  Wed Jun 17 00:50:33 2009
Return-Path: <gregw@webtide.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 5B5F53A6DBA for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 00:50:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[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 ueRhDU-liY8g for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 00:50:32 -0700 (PDT)
Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by core3.amsl.com (Postfix) with ESMTP id 6DB7D3A6DED for <hybi@ietf.org>; Wed, 17 Jun 2009 00:50:32 -0700 (PDT)
Received: by wa-out-1112.google.com with SMTP id l35so67708waf.5 for <hybi@ietf.org>; Wed, 17 Jun 2009 00:50:39 -0700 (PDT)
Received: by 10.114.37.1 with SMTP id k1mr15007027wak.28.1245225039583; Wed, 17 Jun 2009 00:50:39 -0700 (PDT)
Received: from ?10.10.1.15? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 38sm387922pxi.112.2009.06.17.00.50.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Jun 2009 00:50:39 -0700 (PDT)
Message-ID: <4A38A043.3030707@webtide.com>
Date: Wed, 17 Jun 2009 17:50:27 +1000
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: Jamie Lokier <jamie@shareable.org>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com> <4A30329E.9070000@webtide.com> <1cb725390906111214o1139491k2bd74c0ccc994005@mail.gmail.com> <4A317B86.7060400@webtide.com> <20090617020851.GS11893@shareable.org>
In-Reply-To: <20090617020851.GS11893@shareable.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 17 Jun 2009 07:50:33 -0000

Jamie Lokier wrote:
> Greg Wilkins wrote:
>> So if you have traffic that is substantially one way, you end up
>> sending lots of empty messages the other direction to keep things
>> balanced.
> 
> It's not immediately obvious, but BWTP will send empty messages in the
> other direction anyway.
> 
> They are called TCP ACKs, and you'd be surprised how little difference
> a few "200 OK" lines makes per ACK, if they are piggybacked properly.
> 
> (Of course they aren't always piggybacked properly.)

Wow - it's like listening to myself when I defend long-polling vs streaming :)



> I'm curious about that.  What known issues are there with
> intermediaries and pipelines?  I'm aware of lots of problems with
> origin servers and pipelines, but not intermediaries.

A good example is apache modproxy, which is request based
and will not forward another request until it has a response
from the last forwarded.

> RFC2616 specifies that under certain conditions, a connection must be
> terminated _abruptly_ when an error response is sent to certain
> requests like POST, to stop a potentially large request from being
> sent whole.  Any pipelined requests after it will be lost, but you
> cannot know which ones the server received and started processing.

I'd really like to have graceful shutdown supported, so that any
party (including intermediaries) can close a connection without
any message loss.   Of course this does not stop unexpected
closures.

> You have, thankfully, already addressed the orderly shutdown problem.
> Real HTTP servers use a lingering half-closed socket, to ensure the
> last response will actually reach the client if the client pipelined
> another request.  This is necessary for reliable behaviour (due to a
> TCP quirk), yet not mentioned in RFC2616.

I still think BWTP needs a little bit more, so that an intermediary
can initiate a graceful shutdown.  It's not enough for it to just
inject a Connection:close message, as a message may arrive from the
other direction.   So I think there needs to be a Connection:closing
message.


and from your prior email:

> I agree, except by dropping HTTP entirely after the negotiation, it
> does implicitly suggests you need multiple connections if the complex
> things, like authentication, need to be different for separate
> back-end processes.

BWTP gives the choice of per connection default or per message headers.

It would be feasible to have each message carrying an authentication
header to be differently authenticated from other messages.

But generally more thought is needed on the whole security/Origin issue.

cheers











From annevk@opera.com  Wed Jun 17 00:52:30 2009
Return-Path: <annevk@opera.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 9A3343A6D49 for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 00:52:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.599
X-Spam-Level: 
X-Spam-Status: No, score=-8.599 tagged_above=-999 required=5 tests=[AWL=-2.000, BAYES_00=-2.599, 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 7RzaK6IpGPYk for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 00:52:29 -0700 (PDT)
Received: from smtp.opera.com (sam.opera.com [213.236.208.81]) by core3.amsl.com (Postfix) with ESMTP id 662973A6BCC for <hybi@ietf.org>; Wed, 17 Jun 2009 00:52:28 -0700 (PDT)
Received: from annevk-t60 (5ED2D22C.cable.ziggo.nl [94.210.210.44]) (authenticated bits=0) by smtp.opera.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id n5H7qSPT032409 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 17 Jun 2009 07:52:29 GMT
Content-Type: text/plain; charset=utf-8
To: "Greg Wilkins" <gregw@webtide.com>, "Ian Hickson" <ian@hixie.ch>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <4A379DFF.8010807@webtide.com> <Pine.LNX.4.62.0906161718470.16244@hixie.dreamhostps.com> <4A3825B9.10607@webtide.com>
Date: Wed, 17 Jun 2009 09:52:32 +0200
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
From: "Anne van Kesteren" <annevk@opera.com>
Organization: Opera Software ASA
Message-ID: <op.uvnr5uqw64w2qv@annevk-t60>
In-Reply-To: <4A3825B9.10607@webtide.com>
User-Agent: Opera Mail/10.00 (Linux)
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 17 Jun 2009 07:52:30 -0000

On Wed, 17 Jun 2009 01:07:37 +0200, Greg Wilkins <gregw@webtide.com> wrote:
> Ian Hickson wrote:
>> On Tue, 16 Jun 2009, Greg Wilkins wrote:
>>>> is there any reason from a browser prospective to avoid the inclusion
>>>> of META-DATA in this kind of protocol?
>>> [...]
>>>
>>> I'm not sure if there are other objections - Ian?
>>
>> It would be best to ask browser vendors directly, but off-hand I can't
>> think of any reasons other than the necessary added complexity (parsing
>> the metadata, handling exposing it to scripts, defining all the error
>> handling to ensure bogus servers are handled predictably, etc).
>
> Note that I think the discussion of what should be exposed/changed in
> the API is a different one to the transport protocol.

The transport protocol still needs to be implemented so the added complexity of BWTP over WS does not seem that great in that respect.


-- 
Anne van Kesteren
http://annevankesteren.nl/

From jonas@sicking.cc  Wed Jun 17 01:00:59 2009
Return-Path: <jonas@sicking.cc>
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 6514D3A6DE4 for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 01:00:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level: 
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 7XuN0cUkQ6RG for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 01:00:58 -0700 (PDT)
Received: from mail-gx0-f214.google.com (mail-gx0-f214.google.com [209.85.217.214]) by core3.amsl.com (Postfix) with ESMTP id 899DC3A6A7A for <hybi@ietf.org>; Wed, 17 Jun 2009 01:00:58 -0700 (PDT)
Received: by gxk10 with SMTP id 10so257535gxk.13 for <hybi@ietf.org>; Wed, 17 Jun 2009 01:01:08 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.151.73.6 with SMTP id a6mr647209ybl.148.1245225668074; Wed, 17  Jun 2009 01:01:08 -0700 (PDT)
In-Reply-To: <4A389CDD.3070309@ericsson.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com>  <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com>  <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com>  <4A389CDD.3070309@ericsson.com>
From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 17 Jun 2009 01:00:48 -0700
Message-ID: <63df84f0906170100j4091c67v5d9783ddaa8118c@mail.gmail.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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, 17 Jun 2009 08:00:59 -0000

On Wed, Jun 17, 2009 at 12:35 AM, Salvatore
Loreto<salvatore.loreto@ericsson.com> wrote:
>> Conceptually, WebSocket is really just a layer on top of TCP/IP that adds
>> a Web "origin"-based security model for browsers;
>
> the problem here is that WebSocket are not built directly on top of TCP/IP,
> but it tries to reuse the HTTP infrastructure to in somehow perform a
> downgrade from the HTTP protocol to
> the TCP protocol and then start to build on top of it.
> So IMHO the protocol should try to interwork in a fair way with the existent
> HTTP infrastructure,
> asking for as minimal as possible update to the elements present in that
> infrastructure.

What is your goal of wanting to "interwork in a fair way with existent
HTTP infrastructure"? It seems very unlikely that whatever protocol
we're describing here will ever be compatible enough with HTTP that
you can reuse HTTP products such as apache or proxies directly.

Is your goal to be able to reuse the code from existing products in a
websocket/BWTP/whathaveyou server? Or to make it easier for people
familiar with HTTP to write a server and/or proxy for the new
protocol?

The fact that WebSocket downgrades from HTTP does not seem to me to be
because we think HTTP fulfilling particular use cases, but because we
want WebSocket to be able to connect through existing proxies. So
compatibility with HTTP in general doesn't seem obviously beneficial
to me.

/ Jonas

From salvatore.loreto@ericsson.com  Wed Jun 17 01:24:57 2009
Return-Path: <salvatore.loreto@ericsson.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 8FC7B3A6DFD for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 01:24:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.56
X-Spam-Level: 
X-Spam-Status: No, score=-6.56 tagged_above=-999 required=5 tests=[AWL=-0.311,  BAYES_00=-2.599, HELO_EQ_SE=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 eZ8rcIpOxEJB for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 01:24:56 -0700 (PDT)
Received: from mailgw4.ericsson.se (mailgw4.ericsson.se [193.180.251.62]) by core3.amsl.com (Postfix) with ESMTP id 37B9C28C0E2 for <hybi@ietf.org>; Wed, 17 Jun 2009 01:24:56 -0700 (PDT)
X-AuditID: c1b4fb3e-b7b1dae000006c99-6e-4a38a861c255
Received: from esealmw127.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw4.ericsson.se (Symantec Mail Security) with SMTP id F9.A1.27801.168A83A4; Wed, 17 Jun 2009 10:25:06 +0200 (CEST)
Received: from esealmw127.eemea.ericsson.se ([153.88.254.175]) by esealmw127.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Wed, 17 Jun 2009 10:24:59 +0200
Received: from mail.lmf.ericsson.se ([131.160.11.50]) by esealmw127.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Wed, 17 Jun 2009 10:24:59 +0200
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3]) by mail.lmf.ericsson.se (Postfix) with ESMTP id 934D5234B; Wed, 17 Jun 2009 11:24:59 +0300 (EEST)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 5C2CA219FF; Wed, 17 Jun 2009 11:24:59 +0300 (EEST)
Received: from localhost.localdomain (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 098E1219CD; Wed, 17 Jun 2009 11:24:59 +0300 (EEST)
Message-ID: <4A38A85A.4000904@ericsson.com>
Date: Wed, 17 Jun 2009 11:24:58 +0300
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090320)
MIME-Version: 1.0
To: Jonas Sicking <jonas@sicking.cc>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com> <4A389CDD.3070309@ericsson.com> <63df84f0906170100j4091c67v5d9783ddaa8118c@mail.gmail.com>
In-Reply-To: <63df84f0906170100j4091c67v5d9783ddaa8118c@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-OriginalArrivalTime: 17 Jun 2009 08:24:59.0486 (UTC) FILETIME=[1A8A27E0:01C9EF25]
X-Brightmail-Tracker: AAAAAA==
Cc: hybi@ietf.org
Subject: Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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, 17 Jun 2009 08:24:57 -0000

Jonas Sicking wrote:
> On Wed, Jun 17, 2009 at 12:35 AM, Salvatore
> Loreto<salvatore.loreto@ericsson.com> wrote:
>   
>>> Conceptually, WebSocket is really just a layer on top of TCP/IP that adds
>>> a Web "origin"-based security model for browsers;
>>>       
>> the problem here is that WebSocket are not built directly on top of TCP/IP,
>> but it tries to reuse the HTTP infrastructure to in somehow perform a
>> downgrade from the HTTP protocol to
>> the TCP protocol and then start to build on top of it.
>> So IMHO the protocol should try to interwork in a fair way with the existent
>> HTTP infrastructure,
>> asking for as minimal as possible update to the elements present in that
>> infrastructure.
>>     
>
> What is your goal of wanting to "interwork in a fair way with existent
> HTTP infrastructure"? It seems very unlikely that whatever protocol
> we're describing here will ever be compatible enough with HTTP that
> you can reuse HTTP products such as apache or proxies directly.
>   
I am perfectly aware of this fact, I mean that whatever will be the 
protocol we won't be able to
reuse HTTP product as they are right now.

The point is, if you want WebSocket of whatever protocol to be able to 
connect through
existing proxies you have to be sure that the traffic generate works in 
a fair way with the HTTP traffic.

Moreover it should be useful start to discuss more about if
- the WebSocket protocol or whatever protocol works with the actual HTTP 
infostructures, or
  if there are problems that need to be investigate and eventually 
solved: e.g. what if it is present
  a transparent proxies ?
- would it be a problem for the proxies as they are right now, if they 
start to receive an huge number
  of request to connect through them?
etc...

regards
Sal


From pieterh@gmail.com  Wed Jun 17 03:04:23 2009
Return-Path: <pieterh@gmail.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 DD02028C17B for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 03:04:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level: 
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 ooNgEh0BHwVw for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 03:04:23 -0700 (PDT)
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by core3.amsl.com (Postfix) with ESMTP id C018328C0EB for <hybi@ietf.org>; Wed, 17 Jun 2009 03:04:22 -0700 (PDT)
Received: by fg-out-1718.google.com with SMTP id d23so740538fga.18 for <hybi@ietf.org>; Wed, 17 Jun 2009 03:04:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=cwAjKt4PDBPEJSpVGlvB7FWh+ZRVYp/R2OwwkHMHW8A=; b=Ug4YNbh+H4HXoA5vwUDZMKHNKSvxUhd9Opv6+gy1e2ECgiv/Ok4gZBDpHxR8Vk4Cc3 goZYvkqktL7xm+452iNrim2S7I4R37MNeGSndgtZXIaOVQgP21VHcLWV8z7yoIor3TlY tfJaIfMaGbpv9MOUeL/Sd6ZFCFO5CaqEcFVc4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=MEVXA7v6iwJvww+JH765ItDxwI5bp59G1+6h7nm0mkZlUQrxWZjkMLZf1dwi+psrLI eTT4jc3H2wbxqMvDMwLIKhfM6NmEJQhIOLGvLyGyVKo4H9LCe2aqyudtckNeDcAteQjM NqeXmfw+Pu5TRMrPyXOqLqWukx51EGfplHWP8=
MIME-Version: 1.0
Sender: pieterh@gmail.com
Received: by 10.86.91.3 with SMTP id o3mr345096fgb.40.1245233054106; Wed, 17  Jun 2009 03:04:14 -0700 (PDT)
In-Reply-To: <20090617012453.GQ11893@shareable.org>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com>  <4A30329E.9070000@webtide.com> <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com>  <20090617012453.GQ11893@shareable.org>
From: Pieter Hintjens <ph@imatix.com>
Date: Wed, 17 Jun 2009 12:03:54 +0200
X-Google-Sender-Auth: d251520749becde6
Message-ID: <5821ea240906170303y71e68b1ev71f4a7b4c35e3fe7@mail.gmail.com>
To: Jamie Lokier <jamie@shareable.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 17 Jun 2009 10:04:23 -0000

On Wed, Jun 17, 2009 at 3:24 AM, Jamie Lokier<jamie@shareable.org> wrote:

> Is there a system for annotating the document with comments?

Good idea.  I've added comments on the main page, and a Talk page for
the proposal.  You can 'watch' the site, or proposal page and
automatically get emails when things change.

Putting comments on the proposal page itself is easy to do but it
rapidly gets confusing, as the comments become out of date.  Thus the
Talk page.

This is easy to change and improve, so feel free to suggest changes
and/or join the site and change it.

-Pieter

From pieterh@gmail.com  Wed Jun 17 03:22:31 2009
Return-Path: <pieterh@gmail.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 304143A686C for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 03:22:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level: 
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 f-tIsEpl65hP for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 03:22:30 -0700 (PDT)
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by core3.amsl.com (Postfix) with ESMTP id 063953A6809 for <hybi@ietf.org>; Wed, 17 Jun 2009 03:22:29 -0700 (PDT)
Received: by fg-out-1718.google.com with SMTP id d23so743288fga.18 for <hybi@ietf.org>; Wed, 17 Jun 2009 03:20:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=8d3nXfEOfr+IxOqcNPv6lqoqrVkh0+VcoYeoF6SefWU=; b=KQsFUy0rZYuA0pV9VnxDni7nkYoi54MQZWfcwkwLuq9Q77neDuVw1IR/3O6cN1yR0r OiQ871VxxK30GF0CC/rw7f+ln/K4z5Whb8XvTWn52umiBrHMpTNQwyD3/ThFs1UxeBT4 5oy4Re6HojEozGaC2Qw6RNhzpTIEnghWAHPqs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=Ie58/2AVPuWVOyJ42sifFHjMJHFXFUqcH1QQ4+/f/VrsNonHJH81/KDY482RJAU9F3 Vt32rBWe/DC3qzJ1nZeD1EqI6hBT1u1j5VtsFvLH+VmPbUE8RHVLsbHMq55UbfYPsSQa IgEcNqQ4zOOQEHSWEZzmYupIQQRwHOS2INV9I=
MIME-Version: 1.0
Sender: pieterh@gmail.com
Received: by 10.86.71.8 with SMTP id t8mr352068fga.60.1245234035129; Wed, 17  Jun 2009 03:20:35 -0700 (PDT)
In-Reply-To: <20090617013029.GR11893@shareable.org>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com>  <4A30329E.9070000@webtide.com> <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com>  <4A311C96.5010605@webtide.com> <5821ea240906110926p4ee80bb9s464d575e12fcc52f@mail.gmail.com>  <20090617013029.GR11893@shareable.org>
From: Pieter Hintjens <ph@imatix.com>
Date: Wed, 17 Jun 2009 12:20:15 +0200
X-Google-Sender-Auth: 07f017158456d2ae
Message-ID: <5821ea240906170320q75cd463aw7d28f51732cc03ad@mail.gmail.com>
To: Jamie Lokier <jamie@shareable.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 17 Jun 2009 10:22:31 -0000

On Wed, Jun 17, 2009 at 3:30 AM, Jamie Lokier<jamie@shareable.org> wrote:

> So something of great value would be a way to Upgrade to the proper
> protocol over the real internet in a way works despite transparent
> proxies on port 80, to the extent that it's possible, and work
> properly when it is not possible to upgrade.

Sounds right.

>> FWIW, I've been trying to get this pattern into AMQP (www.amqp.org)
>> for about two years, without success.
>
> The "authenticate first then do fast messaging" pattern is extremely
> common.
>
> I'm not familiar with AMQP's details.  In what way does it not fit that
> pattern?

Not just authentication, in AMQP's case, but also resource creation
and 'wiring'.  AMQP is a messaging protocol and the initial
conversation between client and server is about creating queues and
bindings, to do message routing and selection within the server.  In
the current designs, this is allowable at any point, and it's not
clearly separated from message flow.  Thus the protocol is a mix of
work which I think is naturally synchronous, with work that is
naturally asynchronous.  The control dialogs (synchronous and low
volume) should IMO be text based, the messaging should be binary
framed (if one wants to use binary framing).  Right now all of AMQP is
binary framed, so expensive to implement, incompatible between
versions, etc.  I'd prefer to see two protocols, a synchronous
text-based protocol for resource setup, upgraded to a thin async
binary protocol for message transfer.  Seems off the table, however.

> Or do you mean emulation over HTTP? =A0I think I saw an implementation
> of AMQP over HTTP advertised not long ago.

That would probably be RestMS (www.restms.org).  It uses a RESTful
model for resource wiring, and has been waiting for Greg to propose
BWTP for the message transport. :-)

-Pieter

From jamie@shareable.org  Wed Jun 17 04:15:44 2009
Return-Path: <jamie@shareable.org>
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 65D5B28C13D for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 04:15:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.89
X-Spam-Level: 
X-Spam-Status: No, score=-5.89 tagged_above=-999 required=5 tests=[AWL=-3.291,  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 UQWGD-Cv81yU for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 04:15:43 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 35D9528C212 for <hybi@ietf.org>; Wed, 17 Jun 2009 04:15:43 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1MGt72-0007QA-PV; Wed, 17 Jun 2009 12:15:28 +0100
Date: Wed, 17 Jun 2009 12:15:28 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Pieter Hintjens <ph@imatix.com>
Message-ID: <20090617111528.GA27947@shareable.org>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com> <4A30329E.9070000@webtide.com> <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com> <4A311C96.5010605@webtide.com> <5821ea240906110926p4ee80bb9s464d575e12fcc52f@mail.gmail.com> <20090617013029.GR11893@shareable.org> <5821ea240906170320q75cd463aw7d28f51732cc03ad@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <5821ea240906170320q75cd463aw7d28f51732cc03ad@mail.gmail.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 17 Jun 2009 11:15:44 -0000

Pieter Hintjens wrote:
> On Wed, Jun 17, 2009 at 3:30 AM, Jamie Lokier<jamie@shareable.org> wrote:
> 
> > So something of great value would be a way to Upgrade to the proper
> > protocol over the real internet in a way works despite transparent
> > proxies on port 80, to the extent that it's possible, and work
> > properly when it is not possible to upgrade.
> 
> Sounds right.
> 
> >> FWIW, I've been trying to get this pattern into AMQP (www.amqp.org)
> >> for about two years, without success.
> >
> > The "authenticate first then do fast messaging" pattern is extremely
> > common.
> >
> > I'm not familiar with AMQP's details.  In what way does it not fit that
> > pattern?
> 
> Not just authentication, in AMQP's case, but also resource creation
> and 'wiring'.  AMQP is a messaging protocol and the initial
> conversation between client and server is about creating queues and
> bindings, to do message routing and selection within the server.  In
> the current designs, this is allowable at any point, and it's not
> clearly separated from message flow.  Thus the protocol is a mix of
> work which I think is naturally synchronous, with work that is
> naturally asynchronous.  The control dialogs (synchronous and low
> volume) should IMO be text based, the messaging should be binary
> framed (if one wants to use binary framing).  Right now all of AMQP is
> binary framed, so expensive to implement, incompatible between
> versions, etc.  I'd prefer to see two protocols, a synchronous
> text-based protocol for resource setup, upgraded to a thin async
> binary protocol for message transfer.  Seems off the table, however.

I'm fine with text-based protocols if you prefer that, but I think the
ability to rewire in the middle is quite useful, as it permits a lot
of useful automatic protocol adaptation to be hidden from applications.

It can be cleanly separate from the message flow without being
restricted to just the beginning, just as HTTP cleanly separates
message headers from the body.  If the problem is that it's readily
visible, update your diagnostic tools.  Diagnostically there's not
much difference between observing negotation at the start of a new
connection, and observing it in the middle of an existing one, if the
protocol is framed well.

For which I do advocate a sort of "big frame" surrounding a message
stream of little frames, so diagnostic/security tools don't have to
inspect the whole data stream to catch the big frame negotiations.

> > Or do you mean emulation over HTTP?  I think I saw an implementation
> > of AMQP over HTTP advertised not long ago.
> 
> That would probably be RestMS (www.restms.org).  It uses a RESTful
> model for resource wiring, and has been waiting for Greg to propose
> BWTP for the message transport. :-)

:-) I've been thinking similarly, and I hope my proposals in the
pipeline will be a good fit for AMQP.  (Very similar to BWTP, but
based on practical experience using the obvious form of bidirectional HTTP).

-- Jamie

From pieterh@gmail.com  Wed Jun 17 04:47:36 2009
Return-Path: <pieterh@gmail.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 455D93A6C42 for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 04:47:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level: 
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[AWL=0.000,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 EJl0Hvo0guGw for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 04:47:35 -0700 (PDT)
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by core3.amsl.com (Postfix) with ESMTP id 2D34E3A6BE1 for <hybi@ietf.org>; Wed, 17 Jun 2009 04:47:35 -0700 (PDT)
Received: by fg-out-1718.google.com with SMTP id 13so74926fge.18 for <hybi@ietf.org>; Wed, 17 Jun 2009 04:47:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=/UZML7rhfm4r1LFegFgrMtdCuA9i6XiM748Oi8g+u5A=; b=g9+GywraKsZB2dNWIIMH2bhebjhKgRJT37Yi1dAP/Uvbwv8ZBxausJHmYc4D6Gtqcr u+mLllHNr7zBkrfG8tbP+Obzie8lTSZyLBkqd0ePDxiZBHpXZE90g/adKeUELk7+sKnp is+mSLRoT1Lg5CmhX3RPdab0PUm2QaS95QR0g=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=QoBIB+uojKpB8zhVPxQ9qV4YA6SmJ0mqHnZwgg/vwIysb/lkmC1GVmvysyDgYxqrJp uMqlhG4ar0+g2LHud8fY9temYIrQ1mHowpjd1zkEJdcY0QrkxAJGC/oMrfOle7HHukjE NzriVna8R3DHgThnfJMHG2Mpc85dbHEsXMSQM=
MIME-Version: 1.0
Sender: pieterh@gmail.com
Received: by 10.86.59.2 with SMTP id h2mr429053fga.73.1245239256080; Wed, 17  Jun 2009 04:47:36 -0700 (PDT)
In-Reply-To: <20090617111528.GA27947@shareable.org>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com>  <4A30329E.9070000@webtide.com> <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com>  <4A311C96.5010605@webtide.com> <5821ea240906110926p4ee80bb9s464d575e12fcc52f@mail.gmail.com>  <20090617013029.GR11893@shareable.org> <5821ea240906170320q75cd463aw7d28f51732cc03ad@mail.gmail.com>  <20090617111528.GA27947@shareable.org>
From: Pieter Hintjens <ph@imatix.com>
Date: Wed, 17 Jun 2009 13:47:16 +0200
X-Google-Sender-Auth: 3bd90321e415100c
Message-ID: <5821ea240906170447p50ab90c8mafa3f9ffce8a4d24@mail.gmail.com>
To: Jamie Lokier <jamie@shareable.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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, 17 Jun 2009 11:47:36 -0000

On Wed, Jun 17, 2009 at 1:15 PM, Jamie Lokier<jamie@shareable.org> wrote:

> I'm fine with text-based protocols if you prefer that, but I think the
> ability to rewire in the middle is quite useful, as it permits a lot
> of useful automatic protocol adaptation to be hidden from applications.

It is sensible to switch from a low-volume text based synchronous
control protocol to a high-volume binary asynchronous message transfer
protocol, but not vice-versa.  It's also not sensible afaics to try to
mix the two in one connection (AMQP does this, and it is horrid).

So I'd say, if stacks want to rewire while they are sending/receiving
messages, they just do that on a separate connection.

> For which I do advocate a sort of "big frame" surrounding a message
> stream of little frames, so diagnostic/security tools don't have to
> inspect the whole data stream to catch the big frame negotiations.

Indeed.  I like using HTTP for the control work because it is so
familiar to the infrastructure.  It's a big, friendly frame.

> :-) I've been thinking similarly, and I hope my proposals in the
> pipeline will be a good fit for AMQP. =A0(Very similar to BWTP, but
> based on practical experience using the obvious form of bidirectional HTT=
P).

This is the thin message transfer protocol we eventually built for our
AMQP implementation: http://wiki.amqp.org/spec:6.  The AMQP protocol
itself is not open to random contributions, unfortunately.

Cheers,
-Pieter

From stpeter@stpeter.im  Wed Jun 17 10:11:27 2009
Return-Path: <stpeter@stpeter.im>
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 1B8F73A6AF2 for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 10:11:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.313
X-Spam-Level: 
X-Spam-Status: No, score=-2.313 tagged_above=-999 required=5 tests=[AWL=0.286,  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 fVkBp1i+suO5 for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 10:11:26 -0700 (PDT)
Received: from stpeter.im (stpeter.im [207.210.219.233]) by core3.amsl.com (Postfix) with ESMTP id 2A0063A6876 for <hybi@ietf.org>; Wed, 17 Jun 2009 10:11:26 -0700 (PDT)
Received: from dhcp-64-101-72-227.cisco.com (dhcp-64-101-72-227.cisco.com [64.101.72.227]) (Authenticated sender: stpeter) by stpeter.im (Postfix) with ESMTPSA id 162A640CFD for <hybi@ietf.org>; Wed, 17 Jun 2009 11:10:58 -0600 (MDT)
Message-ID: <4A3923A2.7020200@stpeter.im>
Date: Wed, 17 Jun 2009 11:10:58 -0600
From: Peter Saint-Andre <stpeter@stpeter.im>
User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302)
MIME-Version: 1.0
To: hybi@ietf.org
X-Enigmail-Version: 0.95.7
OpenPGP: url=http://www.saint-andre.com/me/stpeter.asc
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Subject: [hybi] moving forward on HTTP extensions
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, 17 Jun 2009 17:11:27 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Some potential future work items for bidirectional HTTP are discussed in
draft-loreto-http-bidirectional-00 as follows:

1. An HTTP extension for long polling, including request tracking,
   duplication, and retry methods.

2. A method for monitoring the state of multiple resources.

3. A request header to determine timeouts.

4. A request header to determine the longest acceptable polling
   interval.

5. Improved rendezvous logic between the user agent, a proxy /
   connection manager, and the backend application server.

6. Improved addressing for the entities involved in bidirectional
   HTTP, possibly including the use of URI templates.

Sal and I just had a chat about this topic and would like to ask for
feedback from the list members:

- - Which work items do folks think would be most productive to focus on?

- - Who will be available in Stockholm to join a bar BOF about this?

- - Would it be helpful to schedule a text or voice chat before IETF 75?

Thanks!

Peter

- --
Peter Saint-Andre
https://stpeter.im/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAko5I6IACgkQNL8k5A2w/vwpjgCcC4T2PL4OpKxx70bNxN4pVAZK
o2oAnjHbiQfyrEUosImI/oB+7jg9yree
=+IB+
-----END PGP SIGNATURE-----

From ian@hixie.ch  Wed Jun 17 11:23:26 2009
Return-Path: <ian@hixie.ch>
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 1849728C170 for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 11:23:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.639
X-Spam-Level: 
X-Spam-Status: No, score=-5.639 tagged_above=-999 required=5 tests=[AWL=-3.040, 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 woOhc0cyX46p for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 11:23:25 -0700 (PDT)
Received: from looneymail-a2.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 3FC0C28C25D for <hybi@ietf.org>; Wed, 17 Jun 2009 11:23:25 -0700 (PDT)
Received: from hixie.dreamhostps.com (hixie.dreamhost.com [208.113.210.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a2.g.dreamhost.com (Postfix) with ESMTP id 6AF5616D43D; Wed, 17 Jun 2009 11:23:36 -0700 (PDT)
Date: Wed, 17 Jun 2009 18:23:36 +0000 (UTC)
From: Ian Hickson <ian@hixie.ch>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
In-Reply-To: <4A389CDD.3070309@ericsson.com>
Message-ID: <Pine.LNX.4.62.0906171814070.16244@hixie.dreamhostps.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com> <4A389CDD.3070309@ericsson.com>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Cc: hybi@ietf.org
Subject: Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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, 17 Jun 2009 18:23:26 -0000

On Wed, 17 Jun 2009, Salvatore Loreto wrote:
> > 
> > The WebSocket protocol is designed on the principle that there should 
> > be minimal framing (the only framing that exists is to make the 
> > protocol frame-based instead of stream-based, and to support a 
> > distinction between Unicode text and binary frames). It is expected 
> > that metadata would be layered on top of WebSocket by the application 
> > layer, in the same way that metadata is layered on top of TCP/IP by 
> > the application layer (HTTP).
>
> I don't see any minimal framing requirement from the requirements list 
> you sent on this list a couple of months ago: 
> http://www.ietf.org/mail-archive/web/hybi/current/msg00007.html

Minimal framing isn't a requirement. Being able to implement the 
server-side component easily is:

| - It must be possible to implement a fully-conforming server-side 
|   component for this in a few dozen lines of scripting code, in the case 
|   where sharing the connection with an HTTP server isn't required.

(I haven't tried implementing BWTP to see if it's possible to implement it 
in a few dozen lines of code; WebSocket can be implemented in Perl using 
only Encode, IO::Socket, and IO::Select in about 100 lines of code.)


I should say, though, that I have no objection to BWTP personally (or to 
any other protocol for that matter). It's more complex than what I would 
ideally like, but if there are implementors or authors who think it is the 
better solution than Web Socket then I encourage them to use it.


> > Conceptually, WebSocket is really just a layer on top of TCP/IP that adds a
> > Web "origin"-based security model for browsers; 
>
> the problem here is that WebSocket are not built directly on top of 
> TCP/IP, but it tries to reuse the HTTP infrastructure to in somehow 
> perform a downgrade from the HTTP protocol to the TCP protocol and then 
> start to build on top of it.

WebSocket stands alone, it just happens to be compatible with an HTTP 
Upgrade handshake. I expect most uses of WebSocket to not involve any HTTP 
servers and to just be a client connecting straight to a WebSocket server.

This is why, for instance, the handshake isn't actually defined in terms 
of HTTP, but in terms of bytes that happen to be compatible with HTTP.

It's wrong to consider WebSocket to be based on HTTP more than TCP.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

From pieterh@gmail.com  Wed Jun 17 11:36:15 2009
Return-Path: <pieterh@gmail.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 C8B3628C2AF for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 11:36:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level: 
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 2uvLNKze0Mdj for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 11:36:15 -0700 (PDT)
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by core3.amsl.com (Postfix) with ESMTP id C8F8A28C234 for <hybi@ietf.org>; Wed, 17 Jun 2009 11:36:14 -0700 (PDT)
Received: by fg-out-1718.google.com with SMTP id 13so166546fge.18 for <hybi@ietf.org>; Wed, 17 Jun 2009 11:36:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=DT7lTAf/iswokZNeAvN2ICm7LKCFtCXnvdupnQYTMZ0=; b=iz9qZZXXefE5XY63kYyvtZlZh+BCKI3SO1IMwU9AoFDgA68ZlDDaXCGuVnKgZzByuj Mnb5CptYy6x87MFsqW6tVK3QR9DxIfh9V6MRhuL3N9N1oQiuIZEpuk78Wa+H8sLxFzGp kONFAYTgfOEa8M4jiwsoTuWFNTQaJi5wRUN8M=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=d4Frv2DsFTMnjaldJvw6FaIiGQzFGrxia0ZuavZgu2ySdVVe8WcZfEQC+3qujyYvom T7SZM3/vf9iRS9ie7psnPmIPyQch28fp7wJygK83QKqLg449CmTWBemKmEtAdKU3kkFL CXgyUSw+6yQBAxQBfY3ijr6ifZRy7efkNKsTc=
MIME-Version: 1.0
Sender: pieterh@gmail.com
Received: by 10.86.71.8 with SMTP id t8mr823543fga.60.1245263784093; Wed, 17  Jun 2009 11:36:24 -0700 (PDT)
In-Reply-To: <4A3923A2.7020200@stpeter.im>
References: <4A3923A2.7020200@stpeter.im>
From: Pieter Hintjens <ph@imatix.com>
Date: Wed, 17 Jun 2009 20:36:04 +0200
X-Google-Sender-Auth: c8006f5a49416b1a
Message-ID: <5821ea240906171136h17bdc1ebx7ede535b1fd6dbf0@mail.gmail.com>
To: Peter Saint-Andre <stpeter@stpeter.im>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] moving forward on HTTP extensions
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, 17 Jun 2009 18:36:15 -0000

On Wed, Jun 17, 2009 at 7:10 PM, Peter Saint-Andre<stpeter@stpeter.im> wrote:

> Sal and I just had a chat about this topic and would like to ask for
> feedback from the list members:
> - - Which work items do folks think would be most productive to focus on?
> - - Who will be available in Stockholm to join a bar BOF about this?
> - - Would it be helpful to schedule a text or voice chat before IETF 75?

All the items look interesting but more detail would help, especially
covering the justification (problems the change would solve,
alternatives, impact of change).

One question: have you already a wiki for this, and if not, shall I
set one up as we did for BWTP?  It could help in capturing the
discussion and organizing the work.

I'm in Brussels but would come to Stockholm if there was a BOF gathering.

Voice chats, not for me thanks.  Maybe an irc meeting.

Cheers,
-Pieter

From gregw@webtide.com  Wed Jun 17 18:58:00 2009
Return-Path: <gregw@webtide.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 31F853A6EE3 for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 18:58:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000,  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 M1gXlauX-CSY for <hybi@core3.amsl.com>; Wed, 17 Jun 2009 18:57:59 -0700 (PDT)
Received: from mail-px0-f171.google.com (mail-px0-f171.google.com [209.85.216.171]) by core3.amsl.com (Postfix) with ESMTP id 744B53A6A1A for <hybi@ietf.org>; Wed, 17 Jun 2009 18:57:59 -0700 (PDT)
Received: by pxi1 with SMTP id 1so340110pxi.29 for <hybi@ietf.org>; Wed, 17 Jun 2009 18:58:09 -0700 (PDT)
Received: by 10.115.91.11 with SMTP id t11mr1211664wal.117.1245290289533; Wed, 17 Jun 2009 18:58:09 -0700 (PDT)
Received: from ?10.10.1.16? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 42sm1765306pxi.156.2009.06.17.18.58.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Jun 2009 18:58:08 -0700 (PDT)
Message-ID: <4A399F2A.6050504@webtide.com>
Date: Thu, 18 Jun 2009 11:58:02 +1000
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: Pieter Hintjens <ph@imatix.com>
References: <4A2F7BB2.5000105@webtide.com> <5821ea240906101020p8d74e9fw44dfb6d7a932bc1d@mail.gmail.com> <4A30329E.9070000@webtide.com> <5821ea240906110041j2e50ad3bv1161525e93792530@mail.gmail.com> <20090617012453.GQ11893@shareable.org> <5821ea240906170303y71e68b1ev71f4a7b4c35e3fe7@mail.gmail.com>
In-Reply-To: <5821ea240906170303y71e68b1ev71f4a7b4c35e3fe7@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] BWTP Proposal - Bidirection Web Transfer Protocol
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: Thu, 18 Jun 2009 01:58:00 -0000

Pieter Hintjens wrote:
> On Wed, Jun 17, 2009 at 3:24 AM, Jamie Lokier<jamie@shareable.org> wrote:
> 
>> Is there a system for annotating the document with comments?
> 
> Good idea.  I've added comments on the main page, and a Talk page for
> the proposal.  You can 'watch' the site, or proposal page and
> automatically get emails when things change.
> 
> Putting comments on the proposal page itself is easy to do but it
> rapidly gets confusing, as the comments become out of date.  Thus the
> Talk page.
> 
> This is easy to change and improve, so feel free to suggest changes
> and/or join the site and change it.
> 
> -Pieter


We need google wave :)




From pieterh@gmail.com  Thu Jun 18 04:41:07 2009
Return-Path: <pieterh@gmail.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 6C21828C30E for <hybi@core3.amsl.com>; Thu, 18 Jun 2009 04:41:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level: 
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 fe4X3LUZYBnc for <hybi@core3.amsl.com>; Thu, 18 Jun 2009 04:41:06 -0700 (PDT)
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by core3.amsl.com (Postfix) with ESMTP id 7561F28C14A for <hybi@ietf.org>; Thu, 18 Jun 2009 04:41:06 -0700 (PDT)
Received: by fg-out-1718.google.com with SMTP id 13so295762fge.18 for <hybi@ietf.org>; Thu, 18 Jun 2009 04:41:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type:content-transfer-encoding; bh=69VvWfINIheJ1/d42OLHlEaTd6t9gAH6AboUDsYJjxc=; b=Cw+m7zZ24paahzzUP8d2zlx2/3kWlZ2L+Cf8ytHX0QJoAf+ZLJ4T0hjyDtDD2V8o8X Zm63QnJMr42tPr4wRdQhEbAL6Nk/VH8caxie+11JX05onxz4tEPCAt79Kt4cJe7uC62W Qvc8Iqa5kYozR4MH9W+iWemZbXZeDSTFqH31E=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=pwptVTOFtBP9GpFeOnkau5JmyQcSWexFqZXSIKr8gxAvHnqiy6RKULcjJppqOL2axp pLIwCmvHoshA1avdYrIuzbENihKq0FjSooVjS41fLAqGVkw6K+18gnsckrLqEKZrxD1t 9JyJfkQKFzxK/YAZvsF8ljHi9mliIZoWlCDgs=
MIME-Version: 1.0
Sender: pieterh@gmail.com
Received: by 10.86.49.13 with SMTP id w13mr1835864fgw.38.1245325276320; Thu,  18 Jun 2009 04:41:16 -0700 (PDT)
In-Reply-To: <4A3A23D4.2080402@ericsson.com>
References: <4A3923A2.7020200@stpeter.im> <5821ea240906171136h17bdc1ebx7ede535b1fd6dbf0@mail.gmail.com>  <4A3A23D4.2080402@ericsson.com>
From: Pieter Hintjens <ph@imatix.com>
Date: Thu, 18 Jun 2009 13:40:56 +0200
X-Google-Sender-Auth: 3116b0647e27dd20
Message-ID: <5821ea240906180440u4d33a9bn861bb8bc50a46fb5@mail.gmail.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>, hybi@ietf.org
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Subject: Re: [hybi] moving forward on HTTP extensions
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: Thu, 18 Jun 2009 11:41:07 -0000

On Thu, Jun 18, 2009 at 1:24 PM, Salvatore
Loreto<salvatore.loreto@ericsson.com> wrote:

> we have tried to list all the issue on the Best Practice draft:
> http://www.ietf.org/internet-drafts/draft-loreto-http-bidirectional-00.txt

This is an excellent text and immediately useful to me, and I'll
reference it in the RestMS design.

The only improvements I could offer are some language simplifications,
the use of passive tense in parts of the text makes the explanations
less precise than they could be.  I'd be happy to edit.

Two questions that occur to me are:

* how these best practices relate to RESTful use of HTTP
* how protocols like WebSockets and BWTP fit into the picture

Cheers,
Pieter

From salvatore.loreto@ericsson.com  Thu Jun 18 05:44:30 2009
Return-Path: <salvatore.loreto@ericsson.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 2B7383A6C15 for <hybi@core3.amsl.com>; Thu, 18 Jun 2009 05:44:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.521
X-Spam-Level: 
X-Spam-Status: No, score=-6.521 tagged_above=-999 required=5 tests=[AWL=-0.272, BAYES_00=-2.599, HELO_EQ_SE=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 YVj57tCmuvkU for <hybi@core3.amsl.com>; Thu, 18 Jun 2009 05:44:29 -0700 (PDT)
Received: from mailgw3.ericsson.se (mailgw3.ericsson.se [193.180.251.60]) by core3.amsl.com (Postfix) with ESMTP id E9DE83A6A9F for <hybi@ietf.org>; Thu, 18 Jun 2009 05:44:28 -0700 (PDT)
X-AuditID: c1b4fb3c-b7b0bae00000673a-ce-4a3a36b70907
Received: from esealmw126.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw3.ericsson.se (Symantec Mail Security) with SMTP id B1.71.26426.7B63A3A4; Thu, 18 Jun 2009 14:44:39 +0200 (CEST)
Received: from esealmw126.eemea.ericsson.se ([153.88.254.174]) by esealmw126.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Thu, 18 Jun 2009 14:44:39 +0200
Received: from mail.lmf.ericsson.se ([131.160.11.50]) by esealmw126.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Thu, 18 Jun 2009 14:44:38 +0200
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3]) by mail.lmf.ericsson.se (Postfix) with ESMTP id B4FA9246A; Thu, 18 Jun 2009 15:44:38 +0300 (EEST)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 80984219FF; Thu, 18 Jun 2009 15:44:38 +0300 (EEST)
Received: from localhost.localdomain (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 3654C219CD; Thu, 18 Jun 2009 15:44:38 +0300 (EEST)
Message-ID: <4A3A36B5.3040802@ericsson.com>
Date: Thu, 18 Jun 2009 15:44:37 +0300
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090320)
MIME-Version: 1.0
To: Pieter Hintjens <ph@imatix.com>
References: <4A3923A2.7020200@stpeter.im> <5821ea240906171136h17bdc1ebx7ede535b1fd6dbf0@mail.gmail.com> <4A3A23D4.2080402@ericsson.com> <5821ea240906180440u4d33a9bn861bb8bc50a46fb5@mail.gmail.com>
In-Reply-To: <5821ea240906180440u4d33a9bn861bb8bc50a46fb5@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-OriginalArrivalTime: 18 Jun 2009 12:44:38.0896 (UTC) FILETIME=[8B013700:01C9F012]
X-Brightmail-Tracker: AAAAAA==
Cc: hybi@ietf.org
Subject: Re: [hybi] moving forward on HTTP extensions
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: Thu, 18 Jun 2009 12:44:30 -0000

Pieter Hintjens wrote:
> On Thu, Jun 18, 2009 at 1:24 PM, Salvatore
> Loreto<salvatore.loreto@ericsson.com> wrote:
>
>   
>> we have tried to list all the issue on the Best Practice draft:
>> http://www.ietf.org/internet-drafts/draft-loreto-http-bidirectional-00.txt
>>     
>
> This is an excellent text and immediately useful to me, and I'll
> reference it in the RestMS design.
>
> The only improvements I could offer are some language simplifications,
> the use of passive tense in parts of the text makes the explanations
> less precise than they could be.  I'd be happy to edit.
>   
any opinions on potential future work items for bidirectional HTTP that 
are listed in the draft?

it would be even more interesting hear your (as well from all the other 
people interested in this issue) ideas/opinions
on how HTTP could be extended to better support bidirectional communication

> Two questions that occur to me are:
>
> * how these best practices relate to RESTful use of HTTP
>   
good point, we haven't said anything about the RESTful use of HTTP for 
bidirectional / long polling.
It would be great explicitly adding some statement explicitly saying that:
- every URI designates exactly one resource
- only GET has to be used to retrieve a representation of a resource.

but I have to admit that I have not looked into RestMS yet!

> * how protocols like WebSockets and BWTP fit into the picture
>   
the best practices draft only relates to the technologies that provide 
server-push using HTTP.
Both WebSocket and BWTP are instead working on a different aspect of the 
server-push technique,
that briefly is upgrade from HTTP to a different bidirectional protocol.
So both the protocols do not fit at all into this draft.

cheers
Sal

From pieterh@gmail.com  Thu Jun 18 06:06:56 2009
Return-Path: <pieterh@gmail.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 D06213A6A90 for <hybi@core3.amsl.com>; Thu, 18 Jun 2009 06:06:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level: 
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 0yjk5tmQoZwg for <hybi@core3.amsl.com>; Thu, 18 Jun 2009 06:06:56 -0700 (PDT)
Received: from mail-fx0-f212.google.com (mail-fx0-f212.google.com [209.85.220.212]) by core3.amsl.com (Postfix) with ESMTP id E054F3A6CBF for <hybi@ietf.org>; Thu, 18 Jun 2009 06:06:55 -0700 (PDT)
Received: by fxm8 with SMTP id 8so1025239fxm.37 for <hybi@ietf.org>; Thu, 18 Jun 2009 06:07:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=hJYuL9GSdk7Ed0gibl3vRMRgEfAjRP8vJ7WA00WLm5c=; b=xE4KqgUodQ10aTUiMWjO8Oemm86JXeZIGBHrOH7uARHn6B5cXBrsM5bUQ4jRJKoDcr 6qM4HVWuvpYcXte7H/D/VISKxWs6/MDnY7X2qBBE2JjOWdOvg7MO6/PS/mZDybyp6FE9 rWrxNaDKq7ahslY9nGvfz+dfIvaJUoNldVUeM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=WlCbiCMury3QzMAbCTAtT9obFkgnun1FFGs0aohVJnc0V0MbqaBlyXGLOHQfDwu6Nb 1WKF8wzOfo2cR+GVW/nRnUCq/ugwgoartmVgO3Z5gc2VKt8UOnuf/IIz2JZE8SsTnho8 +CMOYwPx4zurA+YR3HuWiqGBqu+y4szFJq7X0=
MIME-Version: 1.0
Sender: pieterh@gmail.com
Received: by 10.86.86.2 with SMTP id j2mr1946548fgb.50.1245330426082; Thu, 18  Jun 2009 06:07:06 -0700 (PDT)
In-Reply-To: <4A3A36B5.3040802@ericsson.com>
References: <4A3923A2.7020200@stpeter.im> <5821ea240906171136h17bdc1ebx7ede535b1fd6dbf0@mail.gmail.com>  <4A3A23D4.2080402@ericsson.com> <5821ea240906180440u4d33a9bn861bb8bc50a46fb5@mail.gmail.com>  <4A3A36B5.3040802@ericsson.com>
From: Pieter Hintjens <ph@imatix.com>
Date: Thu, 18 Jun 2009 15:06:46 +0200
X-Google-Sender-Auth: 5c6379827b520f0e
Message-ID: <5821ea240906180606u39c5067ei5cfc47d201c06bdc@mail.gmail.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] moving forward on HTTP extensions
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: Thu, 18 Jun 2009 13:06:56 -0000

On Thu, Jun 18, 2009 at 2:44 PM, Salvatore
Loreto<salvatore.loreto@ericsson.com> wrote:

> any opinions on potential future work items for bidirectional HTTP that are
> listed in the draft?

I am not really competent to give opinions except that (a) the work
items seem to make sense, but (b) it may be more pragmatic to solve
some of them outside HTTP, e.g. with BWTP.

> that briefly is upgrade from HTTP to a different bidirectional protocol.
> So both the protocols do not fit at all into this draft.

Understood.

-Pieter

From Martin.Thomson@andrew.com  Thu Jun 18 23:57:28 2009
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 31ADD3A679C for <hybi@core3.amsl.com>; Thu, 18 Jun 2009 23:57:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.544
X-Spam-Level: 
X-Spam-Status: No, score=-2.544 tagged_above=-999 required=5 tests=[AWL=0.055,  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 EBniDSFpXf8v for <hybi@core3.amsl.com>; Thu, 18 Jun 2009 23:57:27 -0700 (PDT)
Received: from andrew.com (smtp3.andrew.com [198.135.207.235]) by core3.amsl.com (Postfix) with ESMTP id 17A853A6359 for <hybi@ietf.org>; Thu, 18 Jun 2009 23:57:26 -0700 (PDT)
X-SEF-Processed: 5_0_0_910__2009_06_19_02_19_25
X-SEF-16EBA1E9-99E8-4E1D-A1CA-4971F5510AF: 1
Received: from acdcexbh1.andrew.com [10.86.20.91] by smtp3.andrew.com - SurfControl E-mail Filter (5.2.1); Fri, 19 Jun 2009 02:19:25 -0500
Received: from AHQEX1.andrew.com ([10.86.20.21]) by acdcexbh1.andrew.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 19 Jun 2009 01:57:39 -0500
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Date: Fri, 19 Jun 2009 01:57:37 -0500
Message-ID: <E51D5B15BFDEFD448F90BDD17D41CFF105EC71BC@AHQEX1.andrew.com>
In-Reply-To: <4A3923A2.7020200@stpeter.im>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [hybi] moving forward on HTTP extensions
Thread-Index: AcnvbrB0KOR3PYaDTkWEArPPsBiNZABNiYsw
References: <4A3923A2.7020200@stpeter.im>
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: "Peter Saint-Andre" <stpeter@stpeter.im>, <hybi@ietf.org>
X-OriginalArrivalTime: 19 Jun 2009 06:57:39.0652 (UTC) FILETIME=[3C2E7040:01C9F0AB]
Subject: Re: [hybi] moving forward on HTTP extensions
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: Fri, 19 Jun 2009 06:57:28 -0000

SGkgUGV0ZXIsDQoNCk15IGZpcnN0IGltcHJlc3Npb24gZnJvbSByZWFkaW5nIHRoZSBkb2N1bWVu
dCBpcyB0aGF0IHRoZSBwcm9ibGVtcyBhcmUgcmVhc29uYWJseSB3ZWxsIHN0YXRlZCwgYnV0IHRo
ZSBwcm9jZXNzIGJ5IHdoaWNoIHRoZXNlIGNvbmNsdXNpb25zIGFyZSBhcnJpdmVkIGF0IGlzIG5v
dCBtYWRlIGVzcGVjaWFsbHkgY2xlYXIuICANCg0KQXQgdGhpcyBzdGFnZSwgdGhpcyBkb2N1bWVu
dCBzZWVtcyB0byBhZGQgdGhlIG1vc3QgdmFsdWUgYXMgYSBwcm9ibGVtIHN0YXRlbWVudCBhbG9u
ZSwgYW5kIGl0IGRvZXMgYSBnb29kIGpvYiBvZiB0aGF0LCBtYXliZSBpdCBjb3VsZCBiZSBlbnRl
cmVkIGFzIG9uZSBoYWxmIG9mIHRoZSBiYXNpcyBvZiBhIFdHIGVmZm9ydC4gIChUaGUgb3RoZXIg
aGFsZiBiZWluZyByZWxhdGVkIHRvIGxvbmdlciB0ZXJtIGVmZm9ydHMuKQ0KDQpNeSBzZWNvbmQg
aW1wcmVzc2lvbiB3YXMgdGhhdCB0aGUgbmFtZSAiQmlkaWVjdGlvbmFsIEhUVFAiIHdhcyB1bmZv
cnR1bmF0ZSwgZXZlbiBpZiB0aGUgbmFtZSBpcyBhY3R1YWxseSBlbnRpcmVseSBwcmVjaXNlLiAg
VGhlIGRvY3VtZW50IGNvbmNlbnRyYXRlcyBvbiB0aGUgcHJhY3RpY2FsIG5lYXItdGVybSBwcm9i
bGVtcyBvZiB1c2luZyBIVFRQIGZvciBiaWRpcmVjdGlvbmFsIGV4Y2hhbmdlcy4gIFRoaXMgZ3Jv
dXAsIHdoaWNoIHNoYXJlcyBhIHNpbWlsYXIgbmFtZSwgaGFzIGEgbGFyZ2VyIHNldCBvZiBnb2Fs
cyB0aGF0IGJyaW5nIGluIGxvbmdlci10ZXJtIGdvYWxzIHRoYXQgZ28gYmV5b25kIEhUVFAuICAi
SFRUUCBsb25nLXBvbGxpbmciIG1pZ2h0IGJlIGEgYmV0dGVyIGNob2ljZS4NCg0KRnJvbSB0aGUg
Y29uY2x1c2lvbnMgZHJhd24gaW4gdGhlIGRyYWZ0LCBpdCBzZWVtcyB0aGF0IGxvbmctcG9sbGlu
ZyBpcyByZWFsbHkgdGhlIG9ubHkgYXBwcm9hY2ggY29uc2lkZXJlZC4gIFdoYXQsIGlmIGFueSwg
cHJvdmlzaW9uIGlzIG1hZGUgZm9yIHN0cmVhbWluZz8gIEl0IHNlZW1zIHRoYXQgc3RyZWFtaW5n
IGlzIG5vdCBhIHByYWN0aWNhbCBuZWFyLXRlcm0gb3B0aW9uIGFuZCBsb25nZXItdGVybSBvcHRp
b25zIGhhdmUgbXVjaCBncmVhdGVyIGZyZWVkb20uICBJJ2QgbGlrZSB0byBzZWUgdGhlIGFuYWx5
c2lzIG9uIHN0cmVhbWluZywgYnV0IEkgY2FuJ3Qgc2VlIGFueXRoaW5nIGNvbWluZyBmcm9tIGl0
LiAgVGhlIGRyYWZ0IGNvdWxkIGJlIGNsZWFyZXIgb24gdGhhdCBwb2ludC4NCg0KQXMgbXVjaCBh
cyBhbnl0aGluZywgdGhpcyBpcyBhIGNhbGwgZm9yIGFuIGFuYWx5c2lzIG9mIHJlcXVpcmVtZW50
cyBmb3IgbG9uZy1wb2xsaW5nLiAgUmF0aGVyIHRoYW4gbGVhcCB0byB3aGF0IGFwcGVhciB0byBi
ZSBjb25jbHVzaW9ucywgd2h5IG5vdCBjb25jZW50cmF0ZSBvbiB0aGUgcHJvYmxlbXMvcmVxdWly
ZW1lbnRzLg0KDQoxLiBSZXF1ZXN0LXJlc3BvbnNlIGNvcnJlbGF0aW9uIGZvciAiaW52ZXJ0ZWQi
IHF1ZXJpZXMsIHN1Y2ggYXMgdGhvc2UgdGhhdCBtaWdodCBvY2N1ciB3aXRoIGxvbmcgcG9sbGlu
Zy4gIElmIEkgdXNlIHBpcGVsaW5pbmcgdG8gcmVkdWNlIGxhdGVuY3ksIGhvdyBkbyBJIGlkZW50
aWZ5IHRvIHRoZSBIVFRQIHNlcnZlciB0aGF0IHRoaXMgInJlcXVlc3QiIEknbSBtYWtpbmcgaXMg
aW4gcmVzcG9uc2UgdG8gdGhlICJyZXNwb25zZSIgaXQgc2VudC4gIFVzZWZ1bC4NCg0KMi4gSWYg
dGhpcyBpcyAicGxlYXNlIHRlbGwgbWUgd2hlbiBodHRwOi8veC5leGFtcGxlLm9yZy9wYWdlIGNo
YW5nZXMiLCB0aGVuIHRoaXMgaXMgY2VydGFpbmx5IHVzZWZ1bCwgYnV0IEknZCBhY3R1YWxseSBz
ZWUgdGhpcyBhcyBhbiBfYXBwbGljYXRpb25fIG9mIHRoaXMgc3BlY2lmaWNhdGlvbiwgbm90IGEg
cGFydCBvZiB0aGlzLiAgRG9uJ3QgcmVhZCB0aGF0IHdyb25nLCBJJ2QgYmUga2VlbiB0byBtYWtl
IHRoaXMgcG9zc2libGUsIGJ1dCBJIGRvbid0IHNlZSBpdCBhcyBhIG5lY2Vzc2FyeSBwYXJ0IG9m
IHRoZSBzb2x1dGlvbi4gIERlZmVyLg0KDQozLTQuIFRpbWVvdXQgbWFuYWdlbWVudCAtIG5lZWQg
YSB3YXkgdG8gc3BlY2lmeS9kZXRlcm1pbmUgdGltZW91dCBjb25zdHJhaW50cyBpbXBvc2VkIGJ5
IGludGVybWVkaWFyaWVzLCB0aGVuIGFjdCBvbiB0aGVtIHRvIGVuc3VyZSB0aGF0IGEgc2VydmVy
IGRvZXNuJ3QgaG9sZCBvbnRvIGEgdHJhbnNhY3Rpb24gdGhhdCBpcyBubyBsb25nZXIgZ29vZC4g
IChJIHRlbmQgdG8gdGhpbmsgdGhhdCBtZWFzdXJpbmcgYmFzZWQgb24gNDA4LzUwNCBmb2xsb3dl
ZCBieSBhIGhpbnQgdG8gdGhlIHNlcnZlciBtaWdodCB3b3JrLCBidXQgdGhhdCB3b3VsZCBiZSBw
cmUtZW1wdGluZyBvbiBteSBwYXJ0LikgIFVzZWZ1bC4NCg0KNS4gSXMgdXNlZnVsLCBidXQgaXMg
cHJvYmFibHkgbGVzcyBjcml0aWNhbC4NCg0KNi4gUmVzb3VyY2UgaWRlbnRpZmljYXRpb24vYWRk
cmVzc2luZy4gIEl0IGlzbid0IHN1ZmZpY2llbnQgdG8gcmVseSBvbiB0aGUgcmVxdWVzdCBVUkkg
Zm9yIHRoaXMgcHVycG9zZSAoYmVjYXVzZSB0aGVuIHlvdSBjYW4ndCBvcGVyYXRlIGxvbmctcG9s
bGluZyBvbiBtdWx0aXBsZSByZXNvdXJjZXMgb24gdGhlIHNhbWUgc2VydmVyIHdpdGhvdXQgYmxv
d2luZyBvdXQgeW91ciBjb25uZWN0aW9uIGJ1ZGdldCAtLSBpbmNpZGVudGFsbHksIHRoaXMgaXMg
YSBwcm9ibGVtIEkgZGlkbid0IHNlZSBleHByZXNzZWQgaW4gdGhlIGRyYWZ0KS4gIFVzZWZ1bC4N
Cg0KLS1NYXJ0aW4NCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBoeWJp
LWJvdW5jZXNAaWV0Zi5vcmcgW21haWx0bzpoeWJpLWJvdW5jZXNAaWV0Zi5vcmddIE9uIEJlaGFs
ZiBPZg0KPiBQZXRlciBTYWludC1BbmRyZQ0KPiBTZW50OiBUaHVyc2RheSwgMTggSnVuZSAyMDA5
IDM6MTEgQU0NCj4gVG86IGh5YmlAaWV0Zi5vcmcNCj4gU3ViamVjdDogW2h5YmldIG1vdmluZyBm
b3J3YXJkIG9uIEhUVFAgZXh0ZW5zaW9ucw0KPiANCj4gU29tZSBwb3RlbnRpYWwgZnV0dXJlIHdv
cmsgaXRlbXMgZm9yIGJpZGlyZWN0aW9uYWwgSFRUUCBhcmUgZGlzY3Vzc2VkDQo+IGluDQo+IGRy
YWZ0LWxvcmV0by1odHRwLWJpZGlyZWN0aW9uYWwtMDAgYXMgZm9sbG93czoNCj4gDQo+IDEuIEFu
IEhUVFAgZXh0ZW5zaW9uIGZvciBsb25nIHBvbGxpbmcsIGluY2x1ZGluZyByZXF1ZXN0IHRyYWNr
aW5nLA0KPiAgICBkdXBsaWNhdGlvbiwgYW5kIHJldHJ5IG1ldGhvZHMuDQo+IA0KPiAyLiBBIG1l
dGhvZCBmb3IgbW9uaXRvcmluZyB0aGUgc3RhdGUgb2YgbXVsdGlwbGUgcmVzb3VyY2VzLg0KPiAN
Cj4gMy4gQSByZXF1ZXN0IGhlYWRlciB0byBkZXRlcm1pbmUgdGltZW91dHMuDQo+IA0KPiA0LiBB
IHJlcXVlc3QgaGVhZGVyIHRvIGRldGVybWluZSB0aGUgbG9uZ2VzdCBhY2NlcHRhYmxlIHBvbGxp
bmcNCj4gICAgaW50ZXJ2YWwuDQo+IA0KPiA1LiBJbXByb3ZlZCByZW5kZXp2b3VzIGxvZ2ljIGJl
dHdlZW4gdGhlIHVzZXIgYWdlbnQsIGEgcHJveHkgLw0KPiAgICBjb25uZWN0aW9uIG1hbmFnZXIs
IGFuZCB0aGUgYmFja2VuZCBhcHBsaWNhdGlvbiBzZXJ2ZXIuDQo+IA0KPiA2LiBJbXByb3ZlZCBh
ZGRyZXNzaW5nIGZvciB0aGUgZW50aXRpZXMgaW52b2x2ZWQgaW4gYmlkaXJlY3Rpb25hbA0KPiAg
ICBIVFRQLCBwb3NzaWJseSBpbmNsdWRpbmcgdGhlIHVzZSBvZiBVUkkgdGVtcGxhdGVzLg0KPiAN
Cj4gU2FsIGFuZCBJIGp1c3QgaGFkIGEgY2hhdCBhYm91dCB0aGlzIHRvcGljIGFuZCB3b3VsZCBs
aWtlIHRvIGFzayBmb3INCj4gZmVlZGJhY2sgZnJvbSB0aGUgbGlzdCBtZW1iZXJzOg0KPiANCj4g
LSAtIFdoaWNoIHdvcmsgaXRlbXMgZG8gZm9sa3MgdGhpbmsgd291bGQgYmUgbW9zdCBwcm9kdWN0
aXZlIHRvIGZvY3VzDQo+IG9uPw0KPiANCj4gLSAtIFdobyB3aWxsIGJlIGF2YWlsYWJsZSBpbiBT
dG9ja2hvbG0gdG8gam9pbiBhIGJhciBCT0YgYWJvdXQgdGhpcz8NCj4gDQo+IC0gLSBXb3VsZCBp
dCBiZSBoZWxwZnVsIHRvIHNjaGVkdWxlIGEgdGV4dCBvciB2b2ljZSBjaGF0IGJlZm9yZSBJRVRG
DQo+IDc1Pw0KPiANCj4gVGhhbmtzIQ0KPiANCj4gUGV0ZXINCj4gDQo+IC0gLS0NCj4gUGV0ZXIg
U2FpbnQtQW5kcmUNCj4gaHR0cHM6Ly9zdHBldGVyLmltLw0KPiANCi0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KVGhpcyBtZXNzYWdlIGlzIGZvciB0aGUgZGVzaWduYXRl
ZCByZWNpcGllbnQgb25seSBhbmQgbWF5DQpjb250YWluIHByaXZpbGVnZWQsIHByb3ByaWV0YXJ5
LCBvciBvdGhlcndpc2UgcHJpdmF0ZSBpbmZvcm1hdGlvbi4gIA0KSWYgeW91IGhhdmUgcmVjZWl2
ZWQgaXQgaW4gZXJyb3IsIHBsZWFzZSBub3RpZnkgdGhlIHNlbmRlcg0KaW1tZWRpYXRlbHkgYW5k
IGRlbGV0ZSB0aGUgb3JpZ2luYWwuICBBbnkgdW5hdXRob3JpemVkIHVzZSBvZg0KdGhpcyBlbWFp
bCBpcyBwcm9oaWJpdGVkLg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
DQpbbWYyXQ0K


From salvatore.loreto@ericsson.com  Sun Jun 28 09:02:32 2009
Return-Path: <salvatore.loreto@ericsson.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 B018728C0EB for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 09:02:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.949
X-Spam-Level: 
X-Spam-Status: No, score=-5.949 tagged_above=-999 required=5 tests=[AWL=-0.783, BAYES_00=-2.599, HELO_EQ_SE=0.35, RCVD_IN_DNSWL_MED=-4, URIBL_RHS_DOB=1.083]
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 qE0GvI571jKR for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 09:02:31 -0700 (PDT)
Received: from mailgw4.ericsson.se (mailgw4.ericsson.se [193.180.251.62]) by core3.amsl.com (Postfix) with ESMTP id 954263A6A0D for <hybi@ietf.org>; Sun, 28 Jun 2009 09:02:30 -0700 (PDT)
X-AuditID: c1b4fb3e-b7be1ae000004757-5f-4a47942876a4
Received: from esealmw128.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw4.ericsson.se (Symantec Mail Security) with SMTP id 66.22.18263.824974A4; Sun, 28 Jun 2009 18:02:48 +0200 (CEST)
Received: from esealmw126.eemea.ericsson.se ([153.88.254.170]) by esealmw128.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Sun, 28 Jun 2009 18:02:48 +0200
Received: from mail.lmf.ericsson.se ([131.160.11.50]) by esealmw126.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);  Sun, 28 Jun 2009 18:02:47 +0200
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3]) by mail.lmf.ericsson.se (Postfix) with ESMTP id B1556246A; Sun, 28 Jun 2009 19:02:47 +0300 (EEST)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 73B93219FF; Sun, 28 Jun 2009 19:02:47 +0300 (EEST)
Received: from localhost.localdomain (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 1896C219AA; Sun, 28 Jun 2009 19:02:47 +0300 (EEST)
Message-ID: <4A479426.8080707@ericsson.com>
Date: Sun, 28 Jun 2009 19:02:46 +0300
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090320)
MIME-Version: 1.0
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
References: <4A3923A2.7020200@stpeter.im> <E51D5B15BFDEFD448F90BDD17D41CFF105EC71BC@AHQEX1.andrew.com>
In-Reply-To: <E51D5B15BFDEFD448F90BDD17D41CFF105EC71BC@AHQEX1.andrew.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-OriginalArrivalTime: 28 Jun 2009 16:02:47.0471 (UTC) FILETIME=[E1474BF0:01C9F809]
X-Brightmail-Tracker: AAAAAA==
Cc: hybi@ietf.org
Subject: Re: [hybi] moving forward on HTTP extensions
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: Sun, 28 Jun 2009 16:02:32 -0000

Hi Martin,

thanks for you useful comments and suggestion.

I want make clear that the draft focus is on the "near term" solutions 
to the problem of using HTTP for bidirectional exchanges
and does not consider at all the longer-term goals that go beyond HTTP.
It only talks about what's possible using the existing protocol and 
existing tools, the intention is to analyse the  current  solutions 
that  go  under  the  Comet  umbrella name,  highlight the problems and 
eventually
propose small possible ways to extend HTTP to accommodate/improve the 
current Comet solution.

To write the document we have analysed how  Bayeux  and  Bosh  protocols 
use  HTTP for  bidirectional exchanges,
and in particular  we have  dug in the  Tomcat implementation of  Cometd 
and  Bayeux to write down the conclusion present in the
draft. I am not saying that they are the final conclusions, actually I 
see them just as a first step to start the discussion...
and then receive different points of view and different experiences 
learned using HTTP for bidirectional exchanges.

it would be also interesting to know from the list members who will be 
available in Stockholm to join a bar BOF about this
(I mean discuss the "near term" part of HyBi group)

see more in line...

thanks
Sal

Thomson, Martin wrote:
> Hi Peter,
>
> My first impression from reading the document is that the problems are reasonably well stated, but the process by which these conclusions are arrived at is not made especially clear.  
>   
I agree on the fact that Section 6 "Future Work" is just a list of 
possible idea, and that it would be better explain better what is behind 
each of the points in the list...
we will clarify that in a next version
> At this stage, this document seems to add the most value as a problem statement alone, and it does a good job of that, maybe it could be entered as one half of the basis of a WG effort.  (The other half being related to longer term efforts.)
>   
thanks, that was the actual intention of the draft.
> My second impression was that the name "Bidiectional HTTP" was unfortunate, even if the name is actually entirely precise.  The document concentrates on the practical near-term problems of using HTTP for bidirectional exchanges.  This group, which shares a similar name, has a larger set of goals that bring in longer-term goals that go beyond HTTP.  "HTTP long-polling" might be a better choice.
>   
actually the draft describe both the two most common server push 
mechanisms: "Long Polling" and  "HTTP Streaming",
even if we analyse HTTP Streaming only from the angle of a possible way 
to answer to a Long Poll request
> From the conclusions drawn in the draft, it seems that long-polling is really the only approach considered.  What, if any, provision is made for streaming?  It seems that streaming is not a practical near-term option and longer-term options have much greater freedom.  I'd like to see the analysis on streaming, but I can't see anything coming from it.  The draft could be clearer on that point.
>   
you are completely right, there isn't any suggestion on how to improve 
the streaming solution. We can spend more time to analyse better this 
problem and then try to define more
definite conclusion.
It would be also interesting receive your opinion as well as comments by 
other expert people on this point.
> As much as anything, this is a call for an analysis of requirements for long-polling.  Rather than leap to what appear to be conclusions, why not concentrate on the problems/requirements.
>   
good suggestion. We will expand the section and put in a more 
problems/requirements way, in a next version!
> 1. Request-response correlation for "inverted" queries, such as those that might occur with long polling.  If I use pipelining to reduce latency, how do I identify to the HTTP server that this "request" I'm making is in response to the "response" it sent.  Useful.
>
> 2. If this is "please tell me when http://x.example.org/page changes", then this is certainly useful, but I'd actually see this as an _application_ of this specification, not a part of this.  Don't read that wrong, I'd be keen to make this possible, but I don't see it as a necessary part of the solution.  Defer.
>
> 3-4. Timeout management - need a way to specify/determine timeout constraints imposed by intermediaries, then act on them to ensure that a server doesn't hold onto a transaction that is no longer good.  (I tend to think that measuring based on 408/504 followed by a hint to the server might work, but that would be pre-empting on my part.)  Useful.
>
> 5. Is useful, but is probably less critical.
>
> 6. Resource identification/addressing.  It isn't sufficient to rely on the request URI for this purpose (because then you can't operate long-polling on multiple resources on the same server without blowing out your connection budget -- incidentally, this is a problem I didn't see expressed in the draft).  Useful.
>
> --Martin
>   
>> -----Original Message-----
>> From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of
>> Peter Saint-Andre
>> Sent: Thursday, 18 June 2009 3:11 AM
>> To: hybi@ietf.org
>> Subject: [hybi] moving forward on HTTP extensions
>>
>> Some potential future work items for bidirectional HTTP are discussed
>> in
>> draft-loreto-http-bidirectional-00 as follows:
>>
>> 1. An HTTP extension for long polling, including request tracking,
>>    duplication, and retry methods.
>>
>> 2. A method for monitoring the state of multiple resources.
>>
>> 3. A request header to determine timeouts.
>>
>> 4. A request header to determine the longest acceptable polling
>>    interval.
>>
>> 5. Improved rendezvous logic between the user agent, a proxy /
>>    connection manager, and the backend application server.
>>
>> 6. Improved addressing for the entities involved in bidirectional
>>    HTTP, possibly including the use of URI templates.
>>
>> Sal and I just had a chat about this topic and would like to ask for
>> feedback from the list members:
>>
>> - - Which work items do folks think would be most productive to focus
>> on?
>>
>> - - Who will be available in Stockholm to join a bar BOF about this?
>>
>> - - Would it be helpful to schedule a text or voice chat before IETF
>> 75?
>>
>> Thanks!
>>
>> Peter
>>
>> - --
>> Peter Saint-Andre
>> https://stpeter.im/
>>     
> ------------------------------------------------------------------------------------------------
> This message is for the designated recipient only and may
> contain privileged, proprietary, or otherwise private information.  
> If you have received it in error, please notify the sender
> immediately and delete the original.  Any unauthorized use of
> this email is prohibited.
> ------------------------------------------------------------------------------------------------
> [mf2]
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>   

From gregw@webtide.com  Sun Jun 28 16:10:20 2009
Return-Path: <gregw@webtide.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 6B53E3A689D for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 16:10:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000,  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 GkIQBiVWRgqE for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 16:10:18 -0700 (PDT)
Received: from mail-px0-f178.google.com (mail-px0-f178.google.com [209.85.216.178]) by core3.amsl.com (Postfix) with ESMTP id 280923A694F for <hybi@ietf.org>; Sun, 28 Jun 2009 16:10:17 -0700 (PDT)
Received: by pxi8 with SMTP id 8so824384pxi.29 for <hybi@ietf.org>; Sun, 28 Jun 2009 16:10:36 -0700 (PDT)
Received: by 10.115.73.13 with SMTP id a13mr10325624wal.198.1246230636002; Sun, 28 Jun 2009 16:10:36 -0700 (PDT)
Received: from ?10.10.1.15? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 16sm385640pxi.50.2009.06.28.16.10.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 28 Jun 2009 16:10:35 -0700 (PDT)
Message-ID: <4A47F861.3060803@webtide.com>
Date: Mon, 29 Jun 2009 09:10:25 +1000
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: Ian Hickson <ian@hixie.ch>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com>	<4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com>	<Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com>	<4A389CDD.3070309@ericsson.com> <Pine.LNX.4.62.0906171814070.16244@hixie.dreamhostps.com>
In-Reply-To: <Pine.LNX.4.62.0906171814070.16244@hixie.dreamhostps.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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: Sun, 28 Jun 2009 23:10:20 -0000

Ian Hickson wrote:

> Minimal framing isn't a requirement. Being able to implement the 
> server-side component easily is:
> 
> | - It must be possible to implement a fully-conforming server-side 
> |   component for this in a few dozen lines of scripting code, in the case 
> |   where sharing the connection with an HTTP server isn't required.

Ian,

Can you expand on why you think this is a requirement?

Are there any other protocols/experiences that you base this on where
average developers have needed to program a server from a raw socket
rather than using a library.

> (I haven't tried implementing BWTP to see if it's possible to implement it 
> in a few dozen lines of code; WebSocket can be implemented in Perl using 
> only Encode, IO::Socket, and IO::Select in about 100 lines of code.)

The intention for BWTP is not for servers/intermediaries to be written
from scratch.   Rather existing HTTP server and proxies servers should be
able to be updated to support BWTP.      The additional code needed
to modify an existing HTTP parser to BWTP should be no more than a
few lines of code.

cheers


From jamie@shareable.org  Sun Jun 28 16:25:31 2009
Return-Path: <jamie@shareable.org>
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 793473A68BB for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 16:25:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.002
X-Spam-Level: 
X-Spam-Status: No, score=-6.002 tagged_above=-999 required=5 tests=[AWL=-3.403, 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 7g+94VP3A3Mg for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 16:25:30 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 1A9193A6824 for <hybi@ietf.org>; Sun, 28 Jun 2009 16:25:30 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1ML3ko-0000Bf-CN; Mon, 29 Jun 2009 00:25:46 +0100
Date: Mon, 29 Jun 2009 00:25:46 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20090628232546.GG29896@shareable.org>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com> <4A389CDD.3070309@ericsson.com> <Pine.LNX.4.62.0906171814070.16244@hixie.dreamhostps.com> <4A47F861.3060803@webtide.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4A47F861.3060803@webtide.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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: Sun, 28 Jun 2009 23:25:31 -0000

Greg Wilkins wrote:
> The additional code needed
> to modify an existing HTTP parser to BWTP should be no more than a
> few lines of code.

I think it's disingenuous to portray BWTP as a few lines of code,
because nobody worries about a "HTTP parser", and nobody uses a "HTTP
parser library" which would be changed for BWTP.

Implementations are always a server, client or both, with the "parser"
being some trivial little part that really is not worth discussing.

Most servers only parse requests and emit responses, and dispatch those
requests and responses in a particular way, often with multiple
processes or threads, or sometimes in sequence.

BWTP changes that pattern quite significantly, and that's where the
interesting part goes.

Of course any bi-directional protocol we're discussion does the same.

The point is that with the effort to build something which handles
bi-directional messaging, the actual *parser* is not likely to be
something to worry about.  Really, the tricky stuff is in keeping
sockets alive, timeouts, flow control, orderly shutdowns, retries,
handling protocol errors.

That stuff applies with any of the bi-directional protocols, even the
ones which haven't said anything about it because they haven't been
implemented and tested yet.  Some of them expect Javascript
applications to deal with it (which imho is a nice way to ensure low
quality implementations.)

-- Jamie

From gregw@webtide.com  Sun Jun 28 16:46:53 2009
Return-Path: <gregw@webtide.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 6E4DC3A694F for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 16:46:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000,  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 YI3huyrJNhr1 for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 16:46:52 -0700 (PDT)
Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.182]) by core3.amsl.com (Postfix) with ESMTP id 972393A68A8 for <hybi@ietf.org>; Sun, 28 Jun 2009 16:46:52 -0700 (PDT)
Received: by wa-out-1112.google.com with SMTP id v27so700538wah.5 for <hybi@ietf.org>; Sun, 28 Jun 2009 16:47:10 -0700 (PDT)
Received: by 10.115.95.13 with SMTP id x13mr10550925wal.156.1246232830402; Sun, 28 Jun 2009 16:47:10 -0700 (PDT)
Received: from ?10.10.1.15? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 7sm10149892pxi.104.2009.06.28.16.47.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 28 Jun 2009 16:47:09 -0700 (PDT)
Message-ID: <4A4800F5.7000409@webtide.com>
Date: Mon, 29 Jun 2009 09:47:01 +1000
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090409)
MIME-Version: 1.0
To: Jamie Lokier <jamie@shareable.org>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com> <4A389CDD.3070309@ericsson.com> <Pine.LNX.4.62.0906171814070.16244@hixie.dreamhostps.com> <4A47F861.3060803@webtide.com> <20090628232546.GG29896@shareable.org>
In-Reply-To: <20090628232546.GG29896@shareable.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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: Sun, 28 Jun 2009 23:46:53 -0000

Jamie Lokier wrote:
> Greg Wilkins wrote:
>> The additional code needed
>> to modify an existing HTTP parser to BWTP should be no more than a
>> few lines of code.
> 
> I think it's disingenuous to portray BWTP as a few lines of code,
> because nobody worries about a "HTTP parser", and nobody uses a "HTTP
> parser library" which would be changed for BWTP.

Jamie,

that is true - but I was trying to compare apples with apples, as
I think a perl program that runs the websocket protocol is little
more than a parser.


> Most servers only parse requests and emit responses, and dispatch those
> requests and responses in a particular way, often with multiple
> processes or threads, or sometimes in sequence.
> 
> BWTP changes that pattern quite significantly, and that's where the
> interesting part goes.

Indeed.   That part falls into providing an application framework
and I think is vital work to abstract an application developer
away from the nuts-and-bolts of a protocol.



> Of course any bi-directional protocol we're discussion does the same.

Agreed.  But this work is also not included in the "few lines" estimate
for the websocket implementation.


> The point is that with the effort to build something which handles
> bi-directional messaging, the actual *parser* is not likely to be
> something to worry about.  Really, the tricky stuff is in keeping
> sockets alive, timeouts, flow control, orderly shutdowns, retries,
> handling protocol errors.

Here I think BWTP will be able to expand on existing HTTP connection
handling.  However it remains to be seen how much will need to be
changed - and I expect it will be more than initially expected.


> That stuff applies with any of the bi-directional protocols, even the
> ones which haven't said anything about it because they haven't been
> implemented and tested yet.  Some of them expect Javascript
> applications to deal with it (which imho is a nice way to ensure low
> quality implementations.)

I generally agree with the sentiment of your post, because I think that
the lines-of-code measure is a poor metric on which to evaluate proposed
protocols.

Having said that, the complexity of implementation is indeed a good
gross measure that should be considered.   For example, my earlier
advocacy for considering BEEP has been dulled because people pointed
out some of the non-trivial complexities that would need to be implemented.

cheers












From ian@hixie.ch  Sun Jun 28 17:51:21 2009
Return-Path: <ian@hixie.ch>
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 F031D3A6B33 for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 17:51:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.501
X-Spam-Level: 
X-Spam-Status: No, score=-5.501 tagged_above=-999 required=5 tests=[AWL=-2.902, 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 GOtx1T9LZmTJ for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 17:51:20 -0700 (PDT)
Received: from looneymail-a3.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 230743A6840 for <hybi@ietf.org>; Sun, 28 Jun 2009 17:51:20 -0700 (PDT)
Received: from hixie.dreamhostps.com (hixie.dreamhost.com [208.113.210.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a3.g.dreamhost.com (Postfix) with ESMTP id 20A1827B6F; Sun, 28 Jun 2009 17:51:40 -0700 (PDT)
Date: Mon, 29 Jun 2009 00:51:40 +0000 (UTC)
From: Ian Hickson <ian@hixie.ch>
To: Greg Wilkins <gregw@webtide.com>
In-Reply-To: <4A47F861.3060803@webtide.com>
Message-ID: <Pine.LNX.4.62.0906290038130.16244@hixie.dreamhostps.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com> <4A389CDD.3070309@ericsson.com> <Pine.LNX.4.62.0906171814070.16244@hixie.dreamhostps.com> <4A47F861.3060803@webtide.com>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Cc: hybi@ietf.org
Subject: Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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: Mon, 29 Jun 2009 00:51:21 -0000

On Mon, 29 Jun 2009, Greg Wilkins wrote:
> Ian Hickson wrote:
> 
> > Minimal framing isn't a requirement. Being able to implement the 
> > server-side component easily is:
> > 
> > | - It must be possible to implement a fully-conforming server-side 
> > |   component for this in a few dozen lines of scripting code, in the case 
> > |   where sharing the connection with an HTTP server isn't required.
> 
> Can you expand on why you think this is a requirement?

If we make it difficult to write a compliant implementation, then we won't 
get many compliant implementations. This will either be because we don't 
get many implementations at all, or because we get many poor quality 
implementations.

Having few implementations is bad because it leads to a monoculture where 
a single vulnerability means the entire ecosystem is vulnerable.

Having many poor quality implementations is bad because interoperability 
will be difficult to achieve, making it less likely that users will have a 
good experience.


> Are there any other protocols/experiences that you base this on where 
> average developers have needed to program a server from a raw socket 
> rather than using a library.

CGI is one example of a technology (though not a protocol) where authors 
have written many implementations, and been able to do so because of the 
relative ease of writing an implementation. I think WebSocket will be 
treated as very similar to CGI on the server-side; while there will 
probably be some widely used libraries, I expect there will also be many 
simple implementations that don't want to rely on third-party software.

I think it's important for this technology to be usable by authors as soon 
as browsers support it; in the case of WebSocket this means not requiring 
that HTTP servers be upgraded, which can take a long time. There are still 
many Web hosts using Apache 1.3, for instance. WebSocket is intended to be 
usable by anyone who can open a Unix socket, which is more or less anyone 
who can write a CGI script today.


> > (I haven't tried implementing BWTP to see if it's possible to 
> > implement it in a few dozen lines of code; WebSocket can be 
> > implemented in Perl using only Encode, IO::Socket, and IO::Select in 
> > about 100 lines of code.)
> 
> The intention for BWTP is not for servers/intermediaries to be written 
> from scratch.  Rather existing HTTP server and proxies servers should be 
> able to be updated to support BWTP.  The additional code needed to 
> modify an existing HTTP parser to BWTP should be no more than a few 
> lines of code.

Right, BWTP and WebSocket serve different goals. WebSocket isn't intended 
to be related to HTTP at all (though it has handshake that appears like 
HTTP and can therefore share a port with an HTTP server).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

From ian@hixie.ch  Sun Jun 28 18:06:22 2009
Return-Path: <ian@hixie.ch>
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 8ABEB3A68D9 for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 18:06:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.375
X-Spam-Level: 
X-Spam-Status: No, score=-5.375 tagged_above=-999 required=5 tests=[AWL=-2.776, 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 MF6UDoMHR7oj for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 18:06:21 -0700 (PDT)
Received: from looneymail-a2.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 797473A68C9 for <hybi@ietf.org>; Sun, 28 Jun 2009 18:06:21 -0700 (PDT)
Received: from hixie.dreamhostps.com (hixie.dreamhost.com [208.113.210.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a2.g.dreamhost.com (Postfix) with ESMTP id A18CD16D32D; Sun, 28 Jun 2009 18:06:40 -0700 (PDT)
Date: Mon, 29 Jun 2009 01:06:40 +0000 (UTC)
From: Ian Hickson <ian@hixie.ch>
To: Greg Wilkins <gregw@webtide.com>
In-Reply-To: <4A4800F5.7000409@webtide.com>
Message-ID: <Pine.LNX.4.62.0906290052350.16244@hixie.dreamhostps.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com> <4A389CDD.3070309@ericsson.com> <Pine.LNX.4.62.0906171814070.16244@hixie.dreamhostps.com> <4A47F861.3060803@webtide.com> <20090628232546.GG29896@shareable.org> <4A4800F5.7000409@webtide.com>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Cc: hybi@ietf.org
Subject: Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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: Mon, 29 Jun 2009 01:06:22 -0000

On Mon, 29 Jun 2009, Greg Wilkins wrote:
> Jamie Lokier wrote:
> > Greg Wilkins wrote:
> >> The additional code needed to modify an existing HTTP parser to BWTP 
> >> should be no more than a few lines of code.
> > 
> > I think it's disingenuous to portray BWTP as a few lines of code, 
> > because nobody worries about a "HTTP parser", and nobody uses a "HTTP 
> > parser library" which would be changed for BWTP.
> 
> that is true - but I was trying to compare apples with apples, as I 
> think a perl program that runs the websocket protocol is little more 
> than a parser.

It is a complete compliant implementation of the entire protocol, 
including all of the code that would be needed to actually use it. It's 
not just the parser, it also does all of the work of listening for new 
connections, handling closing connections, etc.

Naturally, this isn't a particular high quality implementation in terms of 
handling high load, etc, and I expect that more elaborate implementations 
will exist to handle scaling better, etc. However, the 99-line sample is 
more than just a demo; it can actually be used to run a real service.


> > Of course any bi-directional protocol we're discussion does the same.
> 
> Agreed.  But this work is also not included in the "few lines" estimate 
> for the websocket implementation.

As far as I can tell, it does:

   http://damowmow.com/playground/demos/websocket/blank-server.pl

For example, here is a two-player tic-tac-toe server built using the same 
code:

   http://damowmow.com/playground/demos/websocket/tic-tac-toe.pl

The only part missing in that code is the tic-tac-toe win detection code, 
other than that it's a complete server that could run actual two-player 
games. It's 148 lines of code (using three built-in Perl libraries 
IO::Socket, IO::Select, and Encode, though you could do it using the core 
functions directly without much change; I just prefer the OOP-based 
interface of the IO libraries).

(I'm not making any claims that the code above is great or scalable or 
anything, only that it implements the protocol in a compliant manner and 
could be useful in practice for simple situations.)


> I generally agree with the sentiment of your post, because I think that 
> the lines-of-code measure is a poor metric on which to evaluate proposed 
> protocols.

Agreed. The requirement for WebSocket wasn't a specific number of lines of 
code; it was just that it should be possible to write the core without 
much effort ("a few dozen" lines of code). The idea is just to ensure that 
writing a fully-compliant server from scratch is feasible, unlike, say, 
with HTTP, where nobody can seriously consider writing a server from 
scratch unless they have several weeks or months of time to dedicate to 
the task.

I think there are roles to play for both technologies with a tiny server 
footprint (like WebSocket) and technologies with serious power and many 
features (like HTTP). They are not mutually exclusive.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

From jamie@shareable.org  Sun Jun 28 21:55:33 2009
Return-Path: <jamie@shareable.org>
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 8A7DF3A6AA6 for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 21:55:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.905
X-Spam-Level: 
X-Spam-Status: No, score=-5.905 tagged_above=-999 required=5 tests=[AWL=-3.306, 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 WauUzmto1bSz for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 21:55:32 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 9A4083A68DE for <hybi@ietf.org>; Sun, 28 Jun 2009 21:55:32 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1ML8uC-0002aN-GM; Mon, 29 Jun 2009 05:55:48 +0100
Date: Mon, 29 Jun 2009 05:55:48 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Ian Hickson <ian@hixie.ch>
Message-ID: <20090629045548.GA9599@shareable.org>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com> <4A389CDD.3070309@ericsson.com> <Pine.LNX.4.62.0906171814070.16244@hixie.dreamhostps.com> <4A47F861.3060803@webtide.com> <Pine.LNX.4.62.0906290038130.16244@hixie.dreamhostps.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.LNX.4.62.0906290038130.16244@hixie.dreamhostps.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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: Mon, 29 Jun 2009 04:55:33 -0000

Ian Hickson wrote:
> I think it's important for this technology to be usable by authors as soon 
> as browsers support it; in the case of WebSocket this means not requiring 
> that HTTP servers be upgraded, which can take a long time. There are still 
> many Web hosts using Apache 1.3, for instance. WebSocket is intended to be 
> usable by anyone who can open a Unix socket, which is more or less anyone 
> who can write a CGI script today.

and

> WebSocket isn't intended to be related to HTTP at all (though it has
> handshake that appears like HTTP and can therefore share a port with
> an HTTP server).

When it shares a port with an HTTP server, you're going to need the
HTTP server to accept WebSocket (non-HTTP) traffic and forward it to
the WS server, or have the WS server forward HTTP traffic to the HTTP
server.

Having the HTTP server forward WebSocket traffic would require
upgrading the HTTP server, as WebSocket protocol is not compatible
with HTTP.  But you said that must not be required, so the only way to
do it is forwarding everything through a WebSocket->HTTP proxy.

Which is a good idea anyway (see cometd and optimal high-load Comet
architectures), but doesn't sit well with the notion of implementing
WebSocket casually.

Secondly, sharing port 80 is going to hit HTTP proxies, low-timeout
NATs, mobile IP connection drops, and HTTP-filtering firewalls.

It's the port 80 issues - HTTP proxies, filters and spontaneous
connection drops - which I think of when I say that a real
implementation intended for the larger Web is not trivial.  Whether
the tricky things are dealt with in WebSockets itself, or in client
applications written by people who only fix what they react to, and
thereby provide a low quality / broken experience for everyone behind
a low quality web connection.  I favour infrastructure which makes
that less likely, rather than more.

I don't think of server scalability as a problem, which is a
relatively easy with modern libraries and frameworks.  I was surprised
you mentioned it.

-- Jamie

From ian@hixie.ch  Sun Jun 28 22:19:24 2009
Return-Path: <ian@hixie.ch>
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 110AE3A6D0D for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 22:19:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.259
X-Spam-Level: 
X-Spam-Status: No, score=-5.259 tagged_above=-999 required=5 tests=[AWL=-2.660, 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 5fyf7kP5oH30 for <hybi@core3.amsl.com>; Sun, 28 Jun 2009 22:19:21 -0700 (PDT)
Received: from looneymail-a2.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 57C033A6887 for <hybi@ietf.org>; Sun, 28 Jun 2009 22:19:21 -0700 (PDT)
Received: from hixie.dreamhostps.com (hixie.dreamhost.com [208.113.210.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a2.g.dreamhost.com (Postfix) with ESMTP id 7EDDB16D32D; Sun, 28 Jun 2009 22:19:41 -0700 (PDT)
Date: Mon, 29 Jun 2009 05:19:41 +0000 (UTC)
From: Ian Hickson <ian@hixie.ch>
To: Jamie Lokier <jamie@shareable.org>
In-Reply-To: <20090629045548.GA9599@shareable.org>
Message-ID: <Pine.LNX.4.62.0906290510580.16244@hixie.dreamhostps.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com> <4A389CDD.3070309@ericsson.com> <Pine.LNX.4.62.0906171814070.16244@hixie.dreamhostps.com> <4A47F861.3060803@webtide.com> <Pine.LNX.4.62.0906290038130.16244@hixie.dreamhostps.com> <20090629045548.GA9599@shareable.org>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Cc: hybi@ietf.org
Subject: Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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: Mon, 29 Jun 2009 05:19:24 -0000

On Mon, 29 Jun 2009, Jamie Lokier wrote:
> Ian Hickson wrote:
> > I think it's important for this technology to be usable by authors as 
> > soon as browsers support it; in the case of WebSocket this means not 
> > requiring that HTTP servers be upgraded, which can take a long time. 
> > There are still many Web hosts using Apache 1.3, for instance. 
> > WebSocket is intended to be usable by anyone who can open a Unix 
> > socket, which is more or less anyone who can write a CGI script today.
> 
> and
> 
> > WebSocket isn't intended to be related to HTTP at all (though it has 
> > handshake that appears like HTTP and can therefore share a port with 
> > an HTTP server).
> 
> When it shares a port with an HTTP server, you're going to need the HTTP 
> server to accept WebSocket (non-HTTP) traffic and forward it to the WS 
> server, or have the WS server forward HTTP traffic to the HTTP server.

Yes, when you want to reuse a port it's going to be much more work than 
100 lines of code, that's for sure.


> Having the HTTP server forward WebSocket traffic would require upgrading 
> the HTTP server, as WebSocket protocol is not compatible with HTTP.  
> But you said that must not be required, so the only way to do it is 
> forwarding everything through a WebSocket->HTTP proxy.

I'm not sure what you mean. You can use WebSocket without an HTTP server 
just by using a port that isn't taken by an HTTP server, that's simple 
(assuming you control the server). If you want to coexist with a server, 
then you have much more work ahead of you, but WebSocket does support that 
case too, and it shouldn't be that hard to do really (you just have to 
catch the Upgrade request before you send any bytes back, so that the 
WebSocket part of the server can do the handshake).


> It's the port 80 issues - HTTP proxies, filters and spontaneous 
> connection drops - which I think of when I say that a real 
> implementation intended for the larger Web is not trivial.

Well you can still use port 80 (or 443) without an HTTP server if you have 
slightly more control over the server, without having to do much more work 
in the way of coding. I agree that if you want to use the same IP and port 
for both HTTP and WebSocket that it will be a lot more work, but that's 
not required for casual use, you can just use another port. It won't work 
in all situations (e.g. when the user has an over-eager firewall), but 
then that's the cost of being able to write a server in 100 lines of code.


> Whether the tricky things are dealt with in WebSockets itself, or in 
> client applications written by people who only fix what they react to, 
> and thereby provide a low quality / broken experience for everyone 
> behind a low quality web connection.  I favour infrastructure which 
> makes that less likely, rather than more.

I don't understand what you mean here. What would a client have to do? 
What would WebSocket have to do that it doesn't already do?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

From gregw@webtide.com  Mon Jun 29 20:05:45 2009
Return-Path: <gregw@webtide.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 6499B3A6979 for <hybi@core3.amsl.com>; Mon, 29 Jun 2009 20:05:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000,  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 ISV7lyJ-n-ob for <hybi@core3.amsl.com>; Mon, 29 Jun 2009 20:05:44 -0700 (PDT)
Received: from mail-px0-f178.google.com (mail-px0-f178.google.com [209.85.216.178]) by core3.amsl.com (Postfix) with ESMTP id 868743A6A32 for <hybi@ietf.org>; Mon, 29 Jun 2009 20:05:44 -0700 (PDT)
Received: by pxi8 with SMTP id 8so1796520pxi.29 for <hybi@ietf.org>; Mon, 29 Jun 2009 20:06:03 -0700 (PDT)
Received: by 10.114.92.20 with SMTP id p20mr12408529wab.172.1246331163004; Mon, 29 Jun 2009 20:06:03 -0700 (PDT)
Received: from ?10.10.1.15? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 12sm220080pxi.124.2009.06.29.20.06.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 29 Jun 2009 20:06:02 -0700 (PDT)
Message-ID: <4A498110.30705@webtide.com>
Date: Tue, 30 Jun 2009 13:05:52 +1000
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.22 (X11/20090608)
MIME-Version: 1.0
To: hybi@ietf.org
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com> <4A389CDD.3070309@ericsson.com> <Pine.LNX.4.62.0906171814070.16244@hixie.dreamhostps.com> <4A47F861.3060803@webtide.com> <Pine.LNX.4.62.0906290038130.16244@hixie.dreamhostps.com>
In-Reply-To: <Pine.LNX.4.62.0906290038130.16244@hixie.dreamhostps.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Subject: Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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: Tue, 30 Jun 2009 03:05:45 -0000

Ian Hickson wrote:
> On Mon, 29 Jun 2009, Greg Wilkins wrote:
>> Ian Hickson wrote:
>>
>>> Minimal framing isn't a requirement. Being able to implement the 
>>> server-side component easily is:
>>>
>>> | - It must be possible to implement a fully-conforming server-side 
>>> |   component for this in a few dozen lines of scripting code, in the case 
>>> |   where sharing the connection with an HTTP server isn't required.
>> Can you expand on why you think this is a requirement?
> 
> If we make it difficult to write a compliant implementation, then we won't 
> get many compliant implementations. This will either be because we don't 
> get many implementations at all, or because we get many poor quality 
> implementations.
> 
> Having few implementations is bad because it leads to a monoculture where 
> a single vulnerability means the entire ecosystem is vulnerable.
> 
> Having many poor quality implementations is bad because interoperability 
> will be difficult to achieve, making it less likely that users will have a 
> good experience.



Ian,

I think lines of code and software quality are orthogonal.

There are many many programmers who are able to produce
very poor quality code in just 1 line.  Even with simple CGI,
I have had many experiences where poor quality client "implementations"
have had unintended consequences.

I believe the path to a good user experience is to give them an
environment that abstracts away the details of the protocol.
Websocket does this on the client side, so I don't see why this
should not be done server side.

But I do agree with you that the protocol should not be difficult to
implement and that we do not want a monoculture.   But it is overly
simplistic to say a protocol that needs more than a few dozen
lines of code is going to be rarely implemented or of poor
quality.


cheers




From ian@hixie.ch  Mon Jun 29 20:20:13 2009
Return-Path: <ian@hixie.ch>
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 B60A83A6C83 for <hybi@core3.amsl.com>; Mon, 29 Jun 2009 20:20:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.153
X-Spam-Level: 
X-Spam-Status: No, score=-5.153 tagged_above=-999 required=5 tests=[AWL=-2.554, 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 PD7LUqPQlKHk for <hybi@core3.amsl.com>; Mon, 29 Jun 2009 20:20:12 -0700 (PDT)
Received: from looneymail-a3.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 97AE33A68F2 for <hybi@ietf.org>; Mon, 29 Jun 2009 20:20:12 -0700 (PDT)
Received: from hixie.dreamhostps.com (hixie.dreamhost.com [208.113.210.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a3.g.dreamhost.com (Postfix) with ESMTP id 96B3727B92; Mon, 29 Jun 2009 20:20:33 -0700 (PDT)
Date: Tue, 30 Jun 2009 03:20:33 +0000 (UTC)
From: Ian Hickson <ian@hixie.ch>
To: Greg Wilkins <gregw@webtide.com>
In-Reply-To: <4A498110.30705@webtide.com>
Message-ID: <Pine.LNX.4.62.0906300316500.16244@hixie.dreamhostps.com>
References: <4A2F7BB2.5000105@webtide.com> <4A3113D7.8090905@sitepen.com> <4A3116F4.9040208@webtide.com> <4A3788CE.3010406@ericsson.com> <Pine.LNX.4.62.0906161708590.16244@hixie.dreamhostps.com> <4A389CDD.3070309@ericsson.com> <Pine.LNX.4.62.0906171814070.16244@hixie.dreamhostps.com> <4A47F861.3060803@webtide.com> <Pine.LNX.4.62.0906290038130.16244@hixie.dreamhostps.com> <4A498110.30705@webtide.com>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Cc: hybi@ietf.org
Subject: Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)
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: Tue, 30 Jun 2009 03:20:13 -0000

On Tue, 30 Jun 2009, Greg Wilkins wrote:
> 
> I believe the path to a good user experience is to give them an 
> environment that abstracts away the details of the protocol. Websocket 
> does this on the client side, so I don't see why this should not be done 
> server side.

I would definitely enourage people to write libraries and the like to 
support WebSocket, indeed. I don't think just because it should be 
possible to write your own WebSocket server that everyone should want to 
do so. (Just like with CGI, most people use libraries, but it's possible 
and easy to not do so if all you want to do is something simple.)


> But I do agree with you that the protocol should not be difficult to 
> implement and that we do not want a monoculture.  But it is overly 
> simplistic to say a protocol that needs more than a few dozen lines of 
> code is going to be rarely implemented or of poor quality.

It is definitely a generalisation, yes. I think there's probably a 
correlation between the typical size of a fully compliant implementation 
and the implementation complexity of the spec, and there's probably a 
correlation between the complexity of the spec and the likelihood that 
implementations will contain bugs. However, it's certainly not the only 
metric to spec or implementation quality.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
