Re: [hybi] Call for interest: multiplexing dedicated for WebSocket

Takeshi Yoshino <tyoshino@google.com> Tue, 04 June 2013 10:36 UTC

Return-Path: <tyoshino@google.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1FC6D21F9678 for <hybi@ietfa.amsl.com>; Tue, 4 Jun 2013 03:36:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.527
X-Spam-Level:
X-Spam-Status: No, score=-1.527 tagged_above=-999 required=5 tests=[AWL=-0.150, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_12=0.6, NO_RELAYS=-0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CChcLUW1nn7S for <hybi@ietfa.amsl.com>; Tue, 4 Jun 2013 03:35:50 -0700 (PDT)
Received: from mail-ea0-x22c.google.com (mail-ea0-x22c.google.com [IPv6:2a00:1450:4013:c01::22c]) by ietfa.amsl.com (Postfix) with ESMTP id F148121F9A77 for <hybi@ietf.org>; Tue, 4 Jun 2013 02:31:36 -0700 (PDT)
Received: by mail-ea0-f172.google.com with SMTP id q10so402622eaj.31 for <hybi@ietf.org>; Tue, 04 Jun 2013 02:31:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=PCsMa/y7zWV0r7isz2e0tWW6f3yiW/XCkCgr9zyQsEk=; b=EvjOb8owd3Opg3WOU4/f3He24XPKwYFrZfMC+chYFdmMtZVVcB8PsmDkdcLadU5N/B HbBpVFeydmZK9XCFb+6lkY7lAMk66/OfTxZZ0nxvD1ieJABAsq76GJgYjs5yrCCj7VUC fRpPHHz7TyiFLMjjj2rEzmssIFRKd2nZBBYAN686LR9AqOknuIHN5Q8NM8EpB44x/ZKW mi3In4oiOJFAUYJOzfVHWpZzlxMp8CRRLajgJ1iYZKi7u2WnbB6upj7c0cR/6gqlD/Td 6G95ydLdM/70Y9Wh39zjJWVHv0EHUe3cu13HCWiyn914dVSVA/XQVwJR/LthxZS073Df 5KyQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=PCsMa/y7zWV0r7isz2e0tWW6f3yiW/XCkCgr9zyQsEk=; b=C+BCDL0+8Fl3s+tqfj0BljThJqZtZ3ljZwUlgrIT299LU8G6HCWp27zNgO6AkxYwHP XLyucEMCn4X45SZZ4avFXOb5Xtdh6jSRVMWjmq/ZrX8diPDjbvDc2jGr19vL8cjSwuQk 18dVwyUAV4Z66CHQwIp8D3R8U9Nmf00SPQcXhOjXWRLrif836QHZQnf/jsl3VLDof0BQ F5/9RUAiuPSS/+hJfbe2Y/6JdwshqmBFKZp94xLSi+SyDPEenEWm3cgnrZURI0Kzm7Xn BYJy20bRcaY8WsEYtgD5foeu4nBM4vj6vdzDF4zw3vNVQZ1ZejF6byiXuApov76YCe6c zA+A==
X-Received: by 10.15.32.142 with SMTP id a14mr25453427eev.152.1370338295737; Tue, 04 Jun 2013 02:31:35 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.86.67 with HTTP; Tue, 4 Jun 2013 02:31:15 -0700 (PDT)
In-Reply-To: <634914A010D0B943A035D226786325D4422DC20DAA@EXVMBX020-12.exch020.serverdata.net>
References: <CAH9hSJZxr+aG7GZa4f-dUOTGj4bnJ+3XxivUX4jei5CMyqN4LQ@mail.gmail.com> <CAH9hSJZUG1f+3Uk=t2=A5i4O9=wPvAisspM=pgmGEH9emTL9-Q@mail.gmail.com> <CAH9hSJZai_UuxW4O6mZcEJT2DJoURtLo16XNci1qkYVWv4HVdg@mail.gmail.com> <007501ce56f0$67f74080$37e5c180$@noemax.com> <519CD6A1.7080708@ericsson.com> <519CE075.4000106@tavendo.de> <CAM5k6X9WmO80hiQZ6_GqK66PAd3of=2ZRi9=VrWj52apA1+=5g@mail.gmail.com> <CAFWmRJ2Hbe0x5FeV2T7Gkp3WEsxQHe2=YPBTgvHYLcus3A4rBQ@mail.gmail.com> <CAH9hSJYOPvsFPDXLOa29ASd8xavLdvfRK_cVd=Uc=Vaydz1O=w@mail.gmail.com> <CAFWmRJ2M0Gtoz80+6v+=0Ldm9+xE2brqD2shVcBPuNz+QGiKHg@mail.gmail.com> <634914A010D0B943A035D226786325D4422DC20DAA@EXVMBX020-12.exch020.serverdata.net>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Tue, 04 Jun 2013 18:31:15 +0900
Message-ID: <CAH9hSJY_f4jS1ks1xzNmJSX5c+BxJv=-cNs5iS4mP2rZvtsvTQ@mail.gmail.com>
To: Tobias Oberstein <tobias.oberstein@tavendo.de>
Content-Type: multipart/alternative; boundary="089e0163521058917804de50bf9b"
X-Gm-Message-State: ALoCoQlUcB1L/VSwdXg2jKe9GWQm+8QEyNh3TMzlu6DrLPof0RudTjAXA/+IRi8kjfbs9GKer55TWD05ruA6A9x/qd4qIB2RrhXuYIz1q9IrcDfIMDccsP3P5fTEs4CkQNM2E3Rv6iBC+T5pFzMtf/8m60Lk+XosCb7RHKHTI3flZY7teTyijL1VKLOWWvm+ZRcSXke96swa
Cc: Simone Bordet <sbordet@intalio.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Call for interest: multiplexing dedicated for WebSocket
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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, 04 Jun 2013 10:36:05 -0000

On Sat, Jun 1, 2013 at 6:55 PM, Tobias Oberstein <
tobias.oberstein@tavendo.de> wrote:

> If intermediaries are no preserve a per-channel priority based scheduling,
> then they might need to know the channel priority.
>

Good point.


> > Sure, but then you force every application to reinvent this mechanism on
> top of
>  > WebSocket mux.
> > At that point, one could argue that application messages could have
> their own
> > "channel_id" in their messages, and applications can do mux themselves,
> if
> > they need it.
>
> Yep, agree.
>
> Scheduling integrated with MUX has another advantage:
>
> e.g. when doing per-channel priority based scheduling the scheduling could
> not only consider channel priority, but also the quota.
>
> A high priority channel with data outstanding to be sent but not quota to
> send would otherwise block a lower priority channel with data _and_ quota.
>

Yes, if the algorithm is designed to do so.


> Another issue: implementing s.th. like priority based scheduling at app
> level would might require to reinvent some kind of fragmentation at the app
> level to be able to schedule according to priority (otherwise once a very
> large message on a low prio channel is started to be sent, it'll block
> everything else).
>
>
Yes. The app must be able to send a fragment.

But it's a matter of WebSocket API. A server can do that, but if a client
want to, it can't for now due to limitation of the API. Hence, it needs
application level fragmentation.


> It seems that HTTP/2 likely will have "request priorization" (I don't know
> about "response priorization").
>
> If we (in a pure WS land) don't have priorization, that's a potential
> disadvantage and source of discussion.
>
>
Yes


> ===
>
> A per-channel scheduling could work according to different policies:
>
> 1. Round-Robin scheduling
> 2. Priority scheduling
> 3. Fair Bandwidth scheduling
> 4. First-Come, First-Serve scheduling
>
> The policy mechnism could be selected for the whole physical WS (and
> communicated for intermediaries), e.g.
>
> Sec-WebSocket-Extensions: mux; scheduler="round-robin"
>
> Only with 2. there is a need to select and communicate a per-channel info
> (during channel creation), e.g.
>
> Sec-WebSocket-Extensions: mux; scheduler="priority"
>
> and then
>
> AddChannelRequest with the 3 RSV bits (currently unassigned) containing a
> priority 0-7 for the channel.
>
> [This does not yet answer how to re-prioritize an existing channel]
>
> Hence I'd like to propose to
>
> 1) add an (optional) extension parameter "scheduler" as above
> 2) use the 3 currently unassigned RSV bits in AddChannelRequest for
> channel prio (when scheduler="priority")
> 3) define appropriate MUST semantics (scheduling should not follow
> advisory semantics .. apps should be able to rely on it)
> 4) probably add a new PriorityControl message to change prio of existing
> channels
>
> ===
>

WebSocket API is not ready for such a sophisticated ToS mechanism.


> Above is a kind of per-channel scheduling. One might argue that it lacks
> in at least 2 respects:
>
> - an app is not able to control e.g. prio on a per-message basis
> - there are no ordering guarantees between messages on different channels
>

I think it's ok.


>
> Example:
> An app creates an empty file on some cloud service. Subsequently the app
> wants to append to that file.
>
> The first could be a high-prio message, the latter messages low-prio.
>
> The app does not care whether those messages travel over 1 physical, or
> multiple different logical WS channels.
>
> However, the app does care that the first "create file" message arrives
> before any subsequent "append to file" messages.
>
> So a different design involving per-message prios on a single WS channel
> (physical or logical) might allow higher-prio messages to overtake lower
> prio-messages, but not otherwise round.
>

I see.