Re: [hybi] Apples and Orangutans

Jamie Lokier <jamie@shareable.org> Mon, 13 April 2009 00:10 UTC

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 E7C2D3A6C75 for <hybi@core3.amsl.com>; Sun, 12 Apr 2009 17:10:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.599
X-Spam-Level:
X-Spam-Status: No, score=-4.599 tagged_above=-999 required=5 tests=[AWL=-2.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 BW4UQh7gmpeG for <hybi@core3.amsl.com>; Sun, 12 Apr 2009 17:10:18 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 15B0B3A6C3E for <hybi@ietf.org>; Sun, 12 Apr 2009 17:10:18 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1Lt9li-00033V-1e; Mon, 13 Apr 2009 01:11:22 +0100
Date: Mon, 13 Apr 2009 01:11:22 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20090413001121.GB10391@shareable.org>
References: <49DEF171.4080506@mozilla.com> <A3699591-148C-4795-967A-6CDE23FE75F0@apple.com> <Pine.LNX.4.62.0904122230550.10339@hixie.dreamhostps.com> <71289452-5A19-48F4-9819-7FD9747EE9CA@apple.com> <Pine.LNX.4.62.0904122251070.10339@hixie.dreamhostps.com> <49E278A6.20709@webtide.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <49E278A6.20709@webtide.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: Re: [hybi] Apples and Orangutans
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, 13 Apr 2009 00:10:19 -0000

Greg Wilkins wrote:
> >I don't understand why a 16bit integer solves the problem for TCP, but a 
> >string doesn't solve the problem for WebSocket. They seem exactly 
> >equivalent to me -- they identify the target of the connection, and by 
> >convention, the protocol that that target supports.
> 
> The big difference is that for the web you only have 2 strings
> while TCP/IP has an infinite number of 16 bit integers.
> 
> ie The TCP/IP model is that if you want a ssh and 2 ftp conversations
> then you open one connection to port 22 and 2 connections to port 21

That's separate connections, to the same service, not to separate
services.

If want to connect to different services on the same host, over TCP/IP
you typically need something like separate IP addresses (bad idea) or
a distinguishing "virtual host" header like HTTP's Host:.  Or
different ports, but then it's not a well known service and often
doesn't work over firewalls.

The analogous thing in WebSockets would be a path for the resource
being connected to, and a string/path to identify the service type.

However, I don't think there is really a need for the second string.

The first one is enough to identify both the resource being connected
to and the service type, in the usual ways that people assign
application-specific meanings to URLs.

-- Jamie