Re: Issue with "bytes" Range Unit and live streaming

Craig Pratt <craig@ecaspia.com> Fri, 20 May 2016 20:22 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 (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B3F5512D161 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 20 May 2016 13:22:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.347
X-Spam-Level:
X-Spam-Status: No, score=-8.347 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=ecaspia-com.20150623.gappssmtp.com
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 PSunTuPqZCQb for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 20 May 2016 13:22: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 ABD8312D62B for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 20 May 2016 13:22:14 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1b3qrw-0007WB-9H for ietf-http-wg-dist@listhub.w3.org; Fri, 20 May 2016 20:18:00 +0000
Resent-Date: Fri, 20 May 2016 20:18:00 +0000
Resent-Message-Id: <E1b3qrw-0007WB-9H@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <craig@caspiaconsulting.com>) id 1b3qrq-0007VQ-9v for ietf-http-wg@listhub.w3.org; Fri, 20 May 2016 20:17:54 +0000
Received: from mail-pf0-f172.google.com ([209.85.192.172]) by maggie.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <craig@caspiaconsulting.com>) id 1b3qro-0003b9-0i for ietf-http-wg@w3.org; Fri, 20 May 2016 20:17:53 +0000
Received: by mail-pf0-f172.google.com with SMTP id b66so23500933pfb.2 for <ietf-http-wg@w3.org>; Fri, 20 May 2016 13:17:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ecaspia-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:organization:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=wL+SB1Mwxr5cp0MGQVhkOewEkKuiMJudzHzeNtNWjYo=; b=pad82+y+ATcX2psVcLrP4bn7373x7fwzc6tKLGJKto0AJLYQkeW/ePdfGocbRHkfSL 0R9uhhKRJ2L1jL61I4Y7SrzQuWpjB9S5V4egYH1R+6RhD7Hz3Nn68nZTGnGCkapxVEll M2nOXxuPnI8bqZAM3g7ReQId55dmIiV7hWjCs/7QfkWelPWaVU9uhA6p+nJdhxdkh1R2 wC68GhczBkb5WQkQnMYPvYM9hNTwRAVb0Ilndv+8PJOyoVzxRWA/a6zhKMRXTZh/eds8 zIRUzSrm99fcuPsCryYcMqqE0oUNMxiaAB+ExeGbSkzc7IB6ECfVp1T0TVxDv/8qlbIH qtfw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=wL+SB1Mwxr5cp0MGQVhkOewEkKuiMJudzHzeNtNWjYo=; b=l9PosNMNbYRmres0zANugXeOurW+8jatTBdV5PtBSa2QlRXz77ZLGjDUXZAsF3BUcJ Zv4vJIp1joNtz3Hu525/krI8Z4weXRDWDNQsGl8088YpqRL/b4spvg+rgaX9gQ/no0eu /CSvV2pfxLXj8cib93g23KLAXdmoE7DDXMzIEnuu4ifBXxjVHHHj+0jIgnwvNGivVCvY b96vrFnl5qMsqnPXF5x4DwNeQk5SvJHHiY4GWEwqMQbEo0kWH5iTssZuiFvM+K2P2FwZ /TM3y6VSBHTuotXllyvjKGtAm0Wrgjgqjp5CPa87ovDPAHsa3D3Iz5kteJKcqrxggp54 tjUg==
X-Gm-Message-State: AOPr4FUbElKT5Pj+8J5TDz2Yr9GSUGKhp2PfKK/GO1kjbDZOXmlRj6R+v5C5c97TS+R3OQ==
X-Received: by 10.98.71.13 with SMTP id u13mr7599878pfa.123.1463775445314; Fri, 20 May 2016 13:17:25 -0700 (PDT)
Received: from [10.10.1.105] (50-193-209-61-static.hfc.comcastbusiness.net. [50.193.209.61]) by smtp.googlemail.com with ESMTPSA id l123sm29140457pfl.36.2016.05.20.13.17.23 for <ietf-http-wg@w3.org> (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 May 2016 13:17:24 -0700 (PDT)
To: ietf-http-wg@w3.org
References: <57102718.7010900@ecaspia.com> <0356EBBE092D394F9291DA01E8D28EC2021CEBE9AC@SEM001PD.sg.iaea.org> <5714A316.1080609@ecaspia.com> <9E953B010F1E974399030905C5DCB2E7183D2D4B@ESESSMB101.ericsson.se> <5715438F.4030100@ecaspia.com> <9E953B010F1E974399030905C5DCB2E7183D3011@ESESSMB101.ericsson.se> <57160081.9050307@ecaspia.com> <9E953B010F1E974399030905C5DCB2E7183D33A3@ESESSMB101.ericsson.se> <5716A8F8.6010208@ecaspia.com> <9E953B010F1E974399030905C5DCB2E7183D3DC4@ESESSMB101.ericsson.se> <5717C89C.1010601@ecaspia.com> <9E953B010F1E974399030905C5DCB2E7183D4070@ESESSMB101.ericsson.se> <CACweHNCFi_x5k6sZ0n3u3oNpa2rE7i-08fh9xtqfZFe4SfjSwA@mail.gmail.com> <5717EFB0.4050708@ecaspia.com> <5718466A.6010602@ecaspia.com> <0356EBBE092D394F9291DA01E8D28EC2022062FEF5@SEM002PD.sg.iaea.org> <7277CE69-0350-4AC2-81BB-61F911087E9D@cablelabs.com> <710FB0BE-8BD5-4F08-8BCC-A2C7F6CFE1E2@mnot.net> <CABkgnnU6nRBiVE9wXO4wgs1aL4QAo=g82U=3EN9fBsw93f_=3w@mail.gmail.com>
From: Craig Pratt <craig@ecaspia.com>
Organization: Caspia Consulting
Message-ID: <573F70D3.7020001@ecaspia.com>
Date: Fri, 20 May 2016 13:17:23 -0700
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.7.0
MIME-Version: 1.0
In-Reply-To: <CABkgnnU6nRBiVE9wXO4wgs1aL4QAo=g82U=3EN9fBsw93f_=3w@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=209.85.192.172; envelope-from=craig@caspiaconsulting.com; helo=mail-pf0-f172.google.com
X-W3C-Hub-Spam-Status: No, score=-5.3
X-W3C-Hub-Spam-Report: AWL=-0.697, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1b3qro-0003b9-0i cb74c2de195437af9289b7341c50eefa
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Issue with "bytes" Range Unit and live streaming
Archived-At: <http://www.w3.org/mid/573F70D3.7020001@ecaspia.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31650
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>

Hi Martin,

I realized I didn't reply directly to your question - and I mentally 
tangled it up with other ideas that were floating around. Let me try to 
address your question (below).

cp

On 5/11/16 6:40 PM, Martin Thomson wrote:
> On 12 May 2016 at 10:59, Mark Nottingham <mnot@mnot.net> wrote:
>> 1. Changing the 'bytes' range-unit to allow this use case
>> 2. Minting a new range-unit
> I suggested a third option: work around the limitation.  Was there a
> reason that isn't feasible?  (There are probably many, but I saw none
> offered.)
>
On 4/20/16 6:11 AM, Martin Thomson wrote:
> On 20 April 2016 at 17:50, Mark Nottingham <mnot@mnot.net> wrote:
>>> How about "b-live"?
>> Better. If we choose to mint a new range-unit, it might be an opportunity to make other changes too, in which case it might be more generic; that would imply a different, more general name. But we're not there yet.
> Maybe I'm not 100% across the constraints that we're operating with
> here, but is there some way to achieve the basic goal here without
> committing to changes to the protocol?
I guess it depends on one's definition of "changing the protocol". 
Someone can use and define unregistered Range Units today, without 
registering them, and without changing the protocol. But I think I know 
what you're asking.

The only real option clients and servers have had for retrieving 
aggregated resource data (the "basic goal") is to use proprietary 
headers - along with a "Vary" to prevent caches from storing (and 
returning) incorrect content.

But my thinking is that random access a resource's data is fundamental 
to HTTP - and clients shouldn't have to do weird and inefficient things 
just to get a resource's data - even if it's growing. And while there 
are a large number of applications of this today, I think the number of 
applications could be larger over time. Random-access audio and video 
are already huge HTTP applications. And Block Chains (distributed 
financial record keeping) could fit this "aggregated resource" model as 
well. HTTP should be able to handle these simple blobs of data in 
non-application-specific ways, IMHO.

>
> I ask because we have exactly one use of ranges in HTTP and that makes
> me highly skeptical that this particular extension point is actually
> extensible.  As noted up-thread, many implementations make
> assumptions.  That makes the chances that we can successfully make
> changes to the protocol quite slim, or at the very least they could be
> expensive.
>
> If we were to, say, accept that Range is how it is, and concentrated
> on using the protocol as it is to solve the problem, could that work,
> or is there some aspect to the problem that I'm missing?
>
> For example...
>
> If I were to request Range: 123456-* and that resulted in me receiving
> an entirely different response (maybe via redirect) that included the
> requested content with a "This-Is-Part-Of: <that other URL>;
> from=123456", would that work?  Or, and I hesitate to suggest this,
> but it does avoid the extra request... Vary: Range.
When I considered changes to the byte-ranges-specifier, I kept running 
into the same question/problem:

"How would a client know that a server could handle "*" in the 
end-byte-pos field?"

A client might want to operate with a server that would support "*" and 
those that don't. And even if a client tried to determine if it wasn't 
supported, it could make assumptions across resources since a server 
could support "*" on some resources (e.g. continuously updating 
resources) and not on others (e.g. static resources).

And since RFC 7233 doesn't mandate a particular response code to a bytes 
Range request that a server doesn't understand, it's difficult to code a 
client to make good determinations and there will be a performance hit 
to doing so regardless. e.g. Some servers might return 416 to a "*" in 
the end-byte-pos, some might return a different error code, and some 
might just disconnect.

Now, I may not be fully understanding your suggestion (which is why it 
took me a while to respond), but I'm not sure how to get past this same 
hurdle that caused me to abandon the path of changing RFC 7233 and 
looking into other options. But there's more than one way to solve this 
for sure. I just saw Range Units as being a well-defined extension 
mechanism that would allow for a reasonable migration path. e.g. There's 
also https://tools.ietf.org/html/draft-combs-http-indeterminate-range-02.

cp
-- 

craig pratt

Caspia Consulting

craig@ecaspia.com

503.746.8008