Re: [Moderator Action] Range Responses of Indeterminate Length: Draft

Amos Jeffries <squid3@treenet.co.nz> Tue, 13 October 2015 09:40 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 917ED1A8776 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 13 Oct 2015 02:40:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.912
X-Spam-Level:
X-Spam-Status: No, score=-6.912 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3m3MU4ZDRrQi for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 13 Oct 2015 02:40:15 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1FC0F1A7020 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 13 Oct 2015 02:40:15 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Zlw1L-0007Rj-8m for ietf-http-wg-dist@listhub.w3.org; Tue, 13 Oct 2015 09:37:23 +0000
Resent-Date: Tue, 13 Oct 2015 09:37:23 +0000
Resent-Message-Id: <E1Zlw1L-0007Rj-8m@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <squid3@treenet.co.nz>) id 1Zlw1I-0007Qz-MI for ietf-http-wg@listhub.w3.org; Tue, 13 Oct 2015 09:37:20 +0000
Received: from 121-99-228-82.static.orcon.net.nz ([121.99.228.82] helo=treenet.co.nz) by lisa.w3.org with esmtp (Exim 4.80) (envelope-from <squid3@treenet.co.nz>) id 1Zlw1G-0006Ba-W0 for ietf-http-wg@w3.org; Tue, 13 Oct 2015 09:37:20 +0000
Received: from [192.168.20.251] (unknown [121.98.42.176]) by treenet.co.nz (Postfix) with ESMTP id 68AF1E6DA0 for <ietf-http-wg@w3.org>; Tue, 13 Oct 2015 22:36:47 +1300 (NZDT)
To: ietf-http-wg@w3.org
References: <F755B212-3186-493F-B298-E529A2502467@plex.tv> <DF498B3A-90B7-4D30-88EA-E312B06F9BC4@mnot.net> <6E1CE901-EF28-44D5-834A-813F34005065@apple.com> <19FE8008-7708-480C-B9C9-EAB325A8F76E@plexapp.com>
From: Amos Jeffries <squid3@treenet.co.nz>
X-Enigmail-Draft-Status: N1110
Message-ID: <561CD08C.5050603@treenet.co.nz>
Date: Tue, 13 Oct 2015 22:36:12 +1300
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
In-Reply-To: <19FE8008-7708-480C-B9C9-EAB325A8F76E@plexapp.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=121.99.228.82; envelope-from=squid3@treenet.co.nz; helo=treenet.co.nz
X-W3C-Hub-Spam-Status: No, score=-4.8
X-W3C-Hub-Spam-Report: AWL=-0.153, BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TVD_RCVD_IP=0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1Zlw1G-0006Ba-W0 d1cb4eb655f93e02097109675fb40174
X-Original-To: ietf-http-wg@w3.org
Subject: Re: [Moderator Action] Range Responses of Indeterminate Length: Draft
Archived-At: <http://www.w3.org/mid/561CD08C.5050603@treenet.co.nz>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/30360
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 7/04/2015 11:39 p.m., Rodger Combs wrote:
> Yup; we use that for some platforms, but not all devices support it,
> and it limits us to the codecs supported by MPEG-TS (or that the
> platform supports in it). We use MPEG-DASH on some platforms, but it
> has similar issues. Both also require either knowledge of the segment
> durations beforehand (here, before they're generated), or the ability
> to force them to be consistent (which is impractical if remuxing
> streams a user's existing video files), though HLS implementations
> tend to be a fair bit more forgiving on this point than DASH ones.
> When it's possible, we've found that a single live-generated MKV file
> streamed over chunked HTTP is both compatible with a very wide
> variety of codecs, and very flexible about the sizes of a stream's
> GoPs and the like.
> 
> One thing I've had success in some experiments with lately is writing
> the MKV header to a single file, writing individual segments to
> separate files, and keeping track of their start timestamps. Then,
> when a request comes in for time T, I can return the header
> concatenated to the segment with the greatest start time <= T, and
> all segments after it. This approach is somewhat similar to how
> MPEG-DASH works, but with the work of preparing a fully-valid MKV
> file handled by the server instead of the client. The downside is
> that implementations often refuse to make any kind of seek in a
> resource that doesn't support range requests (and you can't properly
> support them when the content length is unknown), so I end up limited
> to seeks to the nearest on-server chunk boundary.

Please do not do that to generate payload streams without some
indicators in the headers or request-URL to distinguish the different
responses. It screws cacheability both in proxies and browsers which are
unaware of how the body is generated.

YouTube partial .swf responses used to do this when the user selected a
custom offset to start playing. There were a lot of problems and
complaints about truncated videos and even wrong codecs being delivered
to users, where one user selecting a late start would make other users
receive truncated videos for a while.


Nasty as they are multipart payloads would be better for HTTP as a whole
to deliver this type of service.

Or dare say it; chunked extensions would have been a perfect solution to
present a kind of multipart payload where the chunk extension headers
are teh multipart prefix. But that ship has sailed for 1.1. We might be
able to get something defined with HTTP/2 extensions or perhapse
PUSH_PROMISE that serves the use case nicer.

Amos