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

Craig Pratt <craig@ecaspia.com> Thu, 12 May 2016 03:42 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 5D07B12D53A for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 11 May 2016 20:42:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.193
X-Spam-Level:
X-Spam-Status: No, score=-7.193 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.723, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.996, 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 vE_KMhPB1P9f for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 11 May 2016 20:42:10 -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 CE67712D0EA for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 11 May 2016 20:42:09 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1b0hRf-0000CM-Cf for ietf-http-wg-dist@listhub.w3.org; Thu, 12 May 2016 03:37:51 +0000
Resent-Date: Thu, 12 May 2016 03:37:51 +0000
Resent-Message-Id: <E1b0hRf-0000CM-Cf@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 <craig@caspiaconsulting.com>) id 1b0hRZ-0000BY-6l for ietf-http-wg@listhub.w3.org; Thu, 12 May 2016 03:37:45 +0000
Received: from mail-pa0-f42.google.com ([209.85.220.42]) by lisa.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <craig@caspiaconsulting.com>) id 1b0hRX-00063c-4Q for ietf-http-wg@w3.org; Thu, 12 May 2016 03:37:44 +0000
Received: by mail-pa0-f42.google.com with SMTP id iv1so24525208pac.2 for <ietf-http-wg@w3.org>; Wed, 11 May 2016 20:37:22 -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=3VdWR3qn64SzUt0z9qLcfPEBqYWk4vI6z+eJe3yJPM4=; b=xcHM6d/Hzz4RpyKMH0G/wqm4poFEV5Pi+6fUo9/c3mL1shXOUGpVMIo/1lhy0dU8bW Rm5sVCuxGqncgCywOIvsshu4Q+W8CTMCCUfF9Bwb+l8WRdT8WCegJGBVWe7fHFjOEKfm W7A8e+UCwrl2Ahwz+XDBvEqtyae+QOfTfbB9BTArh0yvsIVGht/MMKeHWoulLjSKSjx9 1P5smKDMt9lflsRWqZIL+jOnR6zlWE9ZhlcqCfpfA02P257vCaehj7ev1YhTBjwYj9Xj Ndx5uz9VSqnhPfqI0iDJ3hPy0SzHxAhH/CWkhZR0tXEPOalZYOvctsZqOTLbjl9ydgH0 TWgA==
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=3VdWR3qn64SzUt0z9qLcfPEBqYWk4vI6z+eJe3yJPM4=; b=kgCiOvbi4W21TNrm0eYSN58FqGNUT5LGa8FQax5q1BJaxPm72sd1ro7NB1T42+d18G w2ZvU2hWVQ4dIQIiommz23PPfKlSnOJP+c/KP+iVZ5K5UT8ljaoAxkTz1K0pbSgozHD2 AqqLtE9BGgyFwKvoJbcmUDVv/5X+6yDYCwE75HbMot+GEzTSZFMWbwFvZw3u/g/EKX5p mfBZNv6saEZ+twlKtAdM3DMb7g2s3ol/QwqldchYa5UWQaQU7KLkd0PHUeb74GDIQYeb GY1zqpn1doKBE1Yr8RDdDsTQBRMyKkYrlnGd0WLr6lq4Omg//5t0V9+smY7gDv1siBRE pNSg==
X-Gm-Message-State: AOPr4FXte3obldUFHvSvxMiBzRDjcNoUt8CxVGVizkd768Q36Tot1lF/G9L67OXYEE9zng==
X-Received: by 10.66.112.34 with SMTP id in2mr10399351pab.52.1463024236560; Wed, 11 May 2016 20:37:16 -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 g77sm15511724pfg.78.2016.05.11.20.37.15 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 May 2016 20:37:15 -0700 (PDT)
To: Adrien de Croy <adrien@qbik.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
References: <emcb5a4323-97fc-4948-a8b8-a367f6d2b48b@bodybag>
From: Craig Pratt <craig@ecaspia.com>
Organization: Caspia Consulting
Message-ID: <5733FA6A.9070204@ecaspia.com>
Date: Wed, 11 May 2016 20:37:14 -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: <emcb5a4323-97fc-4948-a8b8-a367f6d2b48b@bodybag>
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=209.85.220.42; envelope-from=craig@caspiaconsulting.com; helo=mail-pa0-f42.google.com
X-W3C-Hub-Spam-Status: No, score=-3.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.723, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1b0hRX-00063c-4Q 542c7dff4bbc7986fcda5958c0fd67de
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/5733FA6A.9070204@ecaspia.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31638
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 5/11/16 7:55 PM, Adrien de Croy wrote:


------ Original Message ------
From: "Craig Pratt" <craig@ecaspia.com>
To: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Sent: 12/05/2016 2:01:39 p.m.
Subject: Re: Issue with "bytes" Range Unit and live streaming

Reply in-line.

cp

On 5/11/16 6:16 PM, Adrien de Croy wrote:

unless we allow Content-Length to also use the new unit (which I'd be dead against), I'd suggest we steer clear of minting any new range units.

[cp] I don't see how a Range Unit would apply to Content-Length.
yes. That's the problem.

And that's why suggestions for alternative range units keep cropping up.

If you're an intermediate that has no knowledge of pages or frames, it's impossible to comply with any other range than bytes.

It's not hard to ask for

GET something?page=1

Which is cachable, vs making life impossible for intermediaries.

Adrien

[cp] This is not a good solution for large representations.

There's no way for a cache to know that "GET something?pages=1-10" has some of the same content that "GET something?pages=2-11" since it doesn't (can't) have any understanding of the URI params. So you'll end up with two copies of pages 2-10 in the cache.

And at the same time, the cache can't service a request of the form "GET something?page=3" for the same reason - even though you would have 2 copies of page 3 in the cache. The request will go to the origin and you'll now have 3 copies of page 3 in the cache.

Obviously, an application can define it's own request header and mark the response data non-cacheable. And this would still be better than the above. But what I would rather do is ensure that any Range Units that are defined include a bytes range that would at least *allow* for caching. A Vary can probably take care of preventing the kind of cache problems like those described above - given a little thought... I'll try to write up something concrete.


Regardless of how a range is requested, the server is always transferring bytes in the response body - whether indicated by Content-Length, chunks, or whatever. The Content-Range response header just lets the server indicate the returned range associated with the response body *in terms of the indicated range unit* and *in the domain of the representation*.

e.g. If a Range Unit called "blobs" is used, and a request is made with "Range: blobs=5-11", the response could have header "Content-Range: blobs=5-11/50" indicating that 7 blobs are being returned (out of 50) in the response body and a "Content-Length: 123456" could also be supplied designating that the response body (associated with blobs 5-11) is 123456 bytes.

Am I missing something?

All the proposed use cases for new range units that I've seen are application specific, and could arguably better be dealt with using another header.

Adrien
[cp] Doesn't the fact that there's a Range Unit Registry mean that Range Units can be added that are application-specific - assuming there's sufficient demand? It's just a different mechanism than adding custom headers, IMHO - with well-defined semantics.



------ Original Message ------
From: "Mark Nottingham" <mnot@mnot.net>
To: "Darshak Thakore" <d.thakore@cablelabs.com>
Cc: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Sent: 12/05/2016 12:59:25 p.m.
Subject: Re: Issue with "bytes" Range Unit and live streaming

Hi Darshak,

I don't think that's where we're at. Based on the discussion so far, it seems like there are two possible paths forward:

1. Changing the 'bytes' range-unit to allow this use case
2. Minting a new range-unit

As discussed, both have downsides. What we need is data about how current implementations -- especially caching intermediaries -- behave when faced with a) 'bytes' used in the desired way, and b) a new range-unit.

Cheers,


 On 11 May 2016, at 5:57 AM, Darshak Thakore <d.thakore@cablelabs.com> wrote:

 Hi all,

 Based on feedback on this thread, it seems like the need for being able to send an open ended (read as unknown-last-byte-pos) Range response has been discussed a couple of times (with different use cases). Also there seems to be somewhat general agreement that the Content-Range ABNF in RFC 7233 is deficient in providing this. The initial argument has been, “is there a compelling enough need” and i think with different use cases popping up (log files, media streaming, gzip… others ??) there seems to be some value in defining a non-application specific Range unit that plugs this gap. Clearly fixing RFC 7233 is invasive and will result in thing breaking in unknown ways so that’s a no-go. With that, we can:
  • Ensure that the scope of this work item is narrow and restricted only to fixing the gap in RFC 7233
  • Define a new range unit (anything with “bytes” in it seems like a bad idea, so maybe call it “live-octets”, “blive”, “b-add" - suggestions welcome….)
  • Decide if there is enough interest/reason to do this as a WG item
 Any objects/suggestions to any of the above ?

 Regards,
 Darshak


 From: "K.Morgan@iaea.org" <K.Morgan@iaea.org>
 Date: Thursday, April 21, 2016 at 4:25 AM
 To: 'Craig Pratt' <craig@ecaspia.com>, "fielding@gbiv.com" <fielding@gbiv.com>
 Cc: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
 Subject: RE: Issue with "bytes" Range Unit and live streaming
 Resent-From: <ietf-http-wg@w3.org>
 Resent-Date: Thursday, April 21, 2016 at 4:25 AM

 On Thursday,21 April 2016 05:18 craig@ecaspia.com wrote:
 >
 > Re: Representation caching
 >
 > Whether a representation is considered cacheable in this use case is at
 > the discretion of the origin server and specific to the use
 > case/application - as it should be (imho). There's no *necessity* in
 > having a periodically-appended resource marked non-cachable, correct? If
 > the resource mutates, it's not cacheable. If it's just being appended
 > to, it is cacheable. And if an appended resource stops being appended
 > to, it doesn't invalidate the cached representation.
 >

 I couldn't agree more. However, it seemed the prevailing sentiment when we tried to resolve the related issue of ranges before content codings, with a new bbcc unit (bytes-before-content-coding), was that the use cases for append-only growth represent an insignificant portion of HTTP traffic. “We live by app-specific protocols to handle these cases. What is so special ... that it must be addressed by http (in a very ugly way)?” [1]

 [1] https://lists.w3.org/Archives/Public/ietf-http-wg/2014AprJun/1383.html" rel="nofollow">https://lists.w3.org/Archives/Public/ietf-http-wg/2014AprJun/1383.html



 This email message is intended only for the use of the named recipient. Information contained in this email message and its attachments may be privileged, confidential and protected from disclosure. If you are not the intended recipient, please do not read, copy, use or disclose this communication to others. Also please notify the sender by replying to this message and then delete it from your system.

-- Mark Nottingham   https://www.mnot.net/" rel="nofollow">https://www.mnot.net/






--
craig pratt

Caspia Consulting

craig@ecaspia.com

503.746.8008












--

craig pratt

Caspia Consulting

craig@ecaspia.com

503.746.8008