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

Craig Pratt <craig@ecaspia.com> Thu, 21 April 2016 03: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 7699012D60D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 20 Apr 2016 20:22:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.917
X-Spam-Level:
X-Spam-Status: No, score=-7.917 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=-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 zL6XfMVoxdAD for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 20 Apr 2016 20:22:46 -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 71FFE12D5EB for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 20 Apr 2016 20:22:45 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1at58Z-0007ik-3g for ietf-http-wg-dist@listhub.w3.org; Thu, 21 Apr 2016 03:18:39 +0000
Resent-Date: Thu, 21 Apr 2016 03:18:39 +0000
Resent-Message-Id: <E1at58Z-0007ik-3g@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 1at58S-0007he-N3 for ietf-http-wg@listhub.w3.org; Thu, 21 Apr 2016 03:18:32 +0000
Received: from mail-pf0-f178.google.com ([209.85.192.178]) by maggie.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <craig@caspiaconsulting.com>) id 1at58Q-00055a-IR for ietf-http-wg@w3.org; Thu, 21 Apr 2016 03:18:32 +0000
Received: by mail-pf0-f178.google.com with SMTP id n1so25027241pfn.2 for <ietf-http-wg@w3.org>; Wed, 20 Apr 2016 20:18:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ecaspia-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ECPd5tbw6Thvr6WT8PCGBwrabPePfzN3fRhFGJhV6fw=; b=1pDGlKZq7Ov2Ivig7tIqVnxd5IlD4HnT1Ou7XRsRiPsXSEJbBsNhZpemlX7mJF9P6m BAjKdlTV6bK9wJ4o7CPEWXxm63LoK7dJuMUj2Nm2pXrNTHTxqzovmQB+qvaeubE352+g ntMGfTHQgrLQqym6jHIBsSUhnzIi/XVUQ5Io6UzAaWAPaj4qZfoAma1Nsf1501uTqnM7 LOVTMJ5/lSorJe916gyDm/cRg7Vs7A/AXJGNhWqNKBWgG2qnluRX7tUa1MM7iYzte4iW uGsa0AGywdThzGwsyA6qPG0nmiRfg41avgbK0hzRF9cuRBPmAEUOjM8zHZHG2QIfAc7E NSKg==
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:cc:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=ECPd5tbw6Thvr6WT8PCGBwrabPePfzN3fRhFGJhV6fw=; b=CpnzCSzM6U3hJEGVwUclmK5lsw5XeK1E5V/NTZKeMrXjanl/PsHIRLAdyftjTUV2Mk mLBjz0BrCSq3+Dnaac0bcm497/SE55NnietSf//zR+RKlRw4DiFQD74wbRuO3NIi5gH9 hoQJDJPVKWNxlM4qLYh4Vk7sg/VDKCNy0bQbClQkPqMVq2F8hhk8lUtosG0oXvgnp67I R93UJT/HZDdI+x86wuupBF2RCqA7RtxCFI0qZUwN5afr0ssKAC9lvr1xsduh1sdgiQIX BgOV/EhD0BAbquTCjj0TLCDDILoxyeBC9mZQhnkHB278bWzcOXcSKXjw3yevg3mQAsCk Ckuw==
X-Gm-Message-State: AOPr4FWKv3RGpCMaHWcMRLELvC6KcrSkGhsVQqpfdTxb3bJ1f7HRWcaAjLVQ3IrFeNI8Lw==
X-Received: by 10.98.52.1 with SMTP id b1mr17105280pfa.54.1461208684081; Wed, 20 Apr 2016 20:18:04 -0700 (PDT)
Received: from [10.10.1.104] (50-193-209-61-static.hfc.comcastbusiness.net. [50.193.209.61]) by smtp.googlemail.com with ESMTPSA id 19sm510928pfu.83.2016.04.20.20.18.02 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Apr 2016 20:18:02 -0700 (PDT)
To: "Roy T. Fielding" <fielding@gbiv.com>
References: <57102718.7010900@ecaspia.com> <2D09D61DDFA73D4C884805CC7865E61142655F7B@GAALPA1MSGUSRBF.ITServices.sbc.com> <D3370313.258AE%goran.ap.eriksson@ericsson.com> <57114878.1030606@ecaspia.com> <43C1ECE7-139E-4FC8-A46D-83887261B7BC@gbiv.com> <6AB4CBAA-E79D-4DAC-818D-65383B85B81B@gbiv.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> <6953797D-40FA-45C3-9294-9A1B0578D58E@gbiv.com>
Cc: ietf-http-wg@w3.org
From: Craig Pratt <craig@ecaspia.com>
Organization: Caspia Consulting
Message-ID: <5718466A.6010602@ecaspia.com>
Date: Wed, 20 Apr 2016 20:18:02 -0700
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
MIME-Version: 1.0
In-Reply-To: <6953797D-40FA-45C3-9294-9A1B0578D58E@gbiv.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=209.85.192.178; envelope-from=craig@caspiaconsulting.com; helo=mail-pf0-f178.google.com
X-W3C-Hub-Spam-Status: No, score=-4.6
X-W3C-Hub-Spam-Report: AWL=-0.019, 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 1at58Q-00055a-IR 43bf2de415d7e94a6104d87c775dc935
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/5718466A.6010602@ecaspia.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31540
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>

Hey Roy,

On 4/20/16 5:36 PM, Roy T. Fielding wrote:
>> On Apr 20, 2016, at 2:08 PM, Craig Pratt <craig@ecaspia.com> wrote:
>>
>> Reply in-line.
>>
>> cp
>>
>> On 4/20/16 1:14 PM, Matthew Kerwin wrote:
>>>
>>> On 21/04/2016 5:37 AM, "Thorsten Lohmar" <thorsten.lohmar@ericsson.com <mailto:thorsten.lohmar@ericsson.com>> wrote:
>>>> Hi Craig,
>>>>
>>>>> What *is* missing is the ability to get a continuous byte range on live content
>>>>> that starts at an arbitrary offset and the ability to directly jump to the live
>>>>> point.
>>>> Yes, and there are two solutions to the issue:
>>>> A. Enable it on HTTP Layer through the definition of a new range request method
>>>> B. Enable working with existing HTTP procedures, i.e. client can workout the precise byte offsets.
>>> C. Use a different URL (e.g. a ?start= query parameter). It's less optimal for caching, but it works today without any new specs.
>>>
>> [cp] We can't use a different URI in our application (the UPnP CDS and DLNA RUIH guidelines only one URI per resource).
>>
>> [cp] We can define a custom header. But (a) it appears that the feature we're describing has been requested many times over, (b) at least having an RFC enables caches to be implemented. Using a custom header or URI will require caching to be disabled by the origin server.
>>
>> [cp] One point I haven't mentioned about caching with bytes-live: Since the bytes-live Range Unit is designed to work in concert with the bytes Range Unit (not superceded it), caching can still be performed by proxies that don't understand bytes-live. The read-through and hit ratio will be reduced. But there's still opportunities to cache.
> This doesn't make any sense.  The live stream URI (whatever it is) always identifies
> the current live stream head.  An HTTP cache cannot save that because each new request
> expects the latest live stream.  What it can do is parallel cache the live stream's
> representation under a different "past stream" URI (or an array of such) and include
> instructions on how to use that within the live stream metadata.  Regardless, the live
> stream HTTP response must be marked as non-cacheable to avoid filling up normal caches.
[cp] I think you need to go back and read the rest of the thread - or 
even just my introduction. This is not the use case described. But I'll 
describe it again another way - in the hopes of avoiding misunderstandings.

The URI in this case refers to a random-accessible representation which 
is periodically appended to - not a live-only stream. The representation 
supports the "bytes" Range Unit, so a client can access bytes 0-1000, 
40000-90000, etc. of the growing resource at its discretion. And at some 
point a client wants to be able to get to the live point - just 
receiving the newly-appended (live) data just like you're describing. 
And to be consistent with HTTP semantics (and enable cache hits btw), a 
Range-less GET will get you the beginning of the representation, not the 
end. So there's no good way to get to the live point currently (polling 
being "non-good").

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.

And with the high compression rates of audio/video streams, and the 
larger capacity of proxy caches, I think video resources are more 
cache-worthy than they have ever been (esp live ones that can put high 
demands on a proxy). But they're still free to implement policy based on 
mime type, expiration, etc. - again, as it should be.
>
> On balance, I think this is a poor use of HTTP.  The Apple live streaming protocol,
> which is just a dynamically updated representation of a queue by reference, is
> able to perform the same task without twisting backwards.  By indirectly referencing
> the data streams, the primary queue can remain non-cacheable (until the stream dies
> and is archived) without impacting (partial) requests on the referenced data streams.
>
> ....Roy
>
[cp] I'm going to assume this conclusion is in question since there's 
misunderstanding of the scenario. If not, I'll describe why both basic 
single-representation content and segmented content have their places. 
And please enlighten me if any of the proposed semantics are not 
consistent with the HTTP representation model.

Happy Wednesday,

cp

-- 

craig pratt

Caspia Consulting

craig@ecaspia.com

503.746.8008