Re: [hybi] Addressing Minimal Events

Frank Salim <frank.salim@kaazing.com> Wed, 15 April 2009 02:32 UTC

Return-Path: <frank.salim@kaazing.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 7F35A3A68A8 for <hybi@core3.amsl.com>; Tue, 14 Apr 2009 19:32:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.677
X-Spam-Level:
X-Spam-Status: No, score=-1.677 tagged_above=-999 required=5 tests=[AWL=0.301, 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 ha-2cqzLKOxS for <hybi@core3.amsl.com>; Tue, 14 Apr 2009 19:32:03 -0700 (PDT)
Received: from mail-gx0-f208.google.com (mail-gx0-f208.google.com [209.85.217.208]) by core3.amsl.com (Postfix) with ESMTP id ACA493A6859 for <hybi@ietf.org>; Tue, 14 Apr 2009 19:32:03 -0700 (PDT)
Received: by gxk4 with SMTP id 4so6305351gxk.13 for <hybi@ietf.org>; Tue, 14 Apr 2009 19:33:15 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.90.68.12 with SMTP id q12mr7171693aga.50.1239762795293; Tue, 14 Apr 2009 19:33:15 -0700 (PDT)
In-Reply-To: <20090414191717.GI32311@shareable.org>
References: <49DEF171.4080506@mozilla.com> <c5b3a7130904100019ged7ec45o749213482f12c878@mail.gmail.com> <op.usaa24vt64w2qv@anne-van-kesterens-macbook.local> <170C0E82-633A-4CA9-B26E-38015BFC7C0D@lindenlab.com> <49E3C476.7090005@webtide.com> <20090414191717.GI32311@shareable.org>
From: Frank Salim <frank.salim@kaazing.com>
Date: Tue, 14 Apr 2009 19:33:00 -0700
Message-ID: <b7197f6c0904141933o14c2cc53qf687458d3f68745e@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] Addressing Minimal Events
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, 15 Apr 2009 02:32:04 -0000

I think that connection sharing and coordinating amongst tabs is well
served by workers, as Ian pointed out. I do not think it should affect
the protocol design.

> What happens when the Javascript
> for the first tab/window is closed and it's acting for all the
> others?  Messy.

I believe this is addressed by workers.

> Unfortunately it does require a lot of code on top of WebSocket to do
> the kind of updates I'm doing.  (Ironic as the point is network
> efficiency and minimal updates).

Code is not bytes on the wire! Addressing your use case in the
protocol makes everyone pay for the features you need, and the cost is
bandwidth instead of code. It is better to address them at a higher
layer with another protocol (AMQP? BEEP?). Likewise, the multiple
widget case is best served by an application protocol with
publish/subscribe semantics.

> From the above, my guess is WebSockets look compelling for the "3
> widgets on a page need updates" case, and for the "I like writing my
> own protocols and having full control" case.
>
> But they don't look compelling for "I want to write an attractive web
> application with lots of updating documents and tiny widgets without
> using a pre-existing application framework or large bit of
> Javascript".

I think that this is correct. However, I think that there is nothing
wrong with using JavaScript to implement an application protocol. This
will be reusable code that is cached in CDNs. It will be much like
using a library that implements a protocol in C.

-Frank