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

Mark Nottingham <mnot@mnot.net> Tue, 19 April 2016 07:23 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 5197C12E898 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 19 Apr 2016 00:23:49 -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, 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
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 TSZaRopl5uxt for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 19 Apr 2016 00:23:45 -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 6CB4812E860 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 19 Apr 2016 00:23: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 1asPwx-00008z-WF for ietf-http-wg-dist@listhub.w3.org; Tue, 19 Apr 2016 07:19:56 +0000
Resent-Date: Tue, 19 Apr 2016 07:19:55 +0000
Resent-Message-Id: <E1asPwx-00008z-WF@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 <mnot@mnot.net>) id 1asPws-00007g-Mm for ietf-http-wg@listhub.w3.org; Tue, 19 Apr 2016 07:19:50 +0000
Received: from mxout-07.mxes.net ([216.86.168.182]) by maggie.w3.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from <mnot@mnot.net>) id 1asPwo-0007LP-2d for ietf-http-wg@w3.org; Tue, 19 Apr 2016 07:19:48 +0000
Received: from [192.168.1.101] (unknown [120.149.194.112]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 9B3A922E253; Tue, 19 Apr 2016 03:19:21 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <57102718.7010900@ecaspia.com>
Date: Tue, 19 Apr 2016 17:19:18 +1000
Cc: IETF HTTP BIS <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <432331E0-4FD1-44E6-8F50-C12BF1852192@mnot.net>
References: <57102718.7010900@ecaspia.com>
To: Craig Pratt <craig@ecaspia.com>
X-Mailer: Apple Mail (2.3124)
Received-SPF: pass client-ip=216.86.168.182; envelope-from=mnot@mnot.net; helo=mxout-07.mxes.net
X-W3C-Hub-Spam-Status: No, score=-8.2
X-W3C-Hub-Spam-Report: AWL=1.358, BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1asPwo-0007LP-2d 1c3a31ac81b079f1cd8d1e8570162741
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/432331E0-4FD1-44E6-8F50-C12BF1852192@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31497
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 Craig,

Thanks very much for that. As others have noted, this has come up before; having a concrete proposal helps move the discussion forward.

I've recorded the draft on our "Potential Future Work" page:
  https://github.com/httpwg/wiki/wiki/WatchList

I'll respond in other parts of the discussion, but one quick bit of feedback; it's not a good idea to use the substring "bytes" in a new range-unit, because some implementations will be scanning for that anywhere in the header (Rodger Combs gave us a heads-up about those bugs in the previous discussion, and it's an unfortunately common pattern with other parts of the stack too).

Cheers,



> On 15 Apr 2016, at 9:26 AM, Craig Pratt <craig@ecaspia.com> wrote:
> 
> Hello all,
> 
> We have a use case where we are "live streaming" media over HTTP. As with other (non-segmented) HTTP streaming applications, our live streaming solution has the HTTP client perform a GET on a URI representing the live audio or video content stream and with the server progressively returning data using chunked transfer coding. The data returned to the server is "live" so long as the client reads data as quickly as it's generated - with TCP flow control allowing the client's reading of the response data to be paced to the live chunk generation of the HTTP server.
> 
> More recently, use cases have appeared that require a combination of random access and live streaming. For example, an HTTP media server may want to support streaming of an in-progress recording - with the HTTP client using HTTP byte Range requests to access any point within the already-recorded content. But we've run into issues supporting both live content transfer and HTTP byte Range requests on the same resource. There's no good way that we've found to get to this "live point" and also support random access. The use case requires a byte range that ends at an indeterminate point, e.g.
> 
>     Range: bytes=1234567-*
> 
> However, the ABNF for the bytes Range Unit doesn't allow for this form of request.
> 
> Rather than coming up with a proprietary solution, we are proposing a new Range Unit called "bytes-live" as a potential solution to this issue. Support for this new "bytes-live" Range Unit could be exposed by servers (using the Accept-Ranges header) for content that support both byte-wise random access and live streaming. e.g. A server that supports both the standard HTTP/1.1 bytes Range Unit and bytes-live would include the header:
> 
>     Accept-Ranges: bytes bytes-live
> 
> An HTTP client can use Range requests with the standard "bytes" Range Unit to transfer stored content from a representation. And when the bytes-live Range Unit is supported, an HTTP client can request a byte range that starts or ends at the live point of the content representation. For example, a client could request the transfer of bytes starting at byte 1234567 and transitioning to the live point once all stored content has been transferred using:
> 
>     Range: bytes-live=1234567-*
> 
> We believe the bytes-live Range Unit could have multiple applications outside of our immediate use cases. For instance, internet-connected video cameras with on-board storage could use bytes-live to support streaming of continuously recording content with lower latencies than can be achieved using HLS, MPEG-DASH, or other segmented video streaming techniques. And there are also applications with on-demand transcoding.
> 
> The draft RFC can be found here https://tools.ietf.org/html/draft-pratt-httpbis-bytes-live-range-unit-00. Please let me know what you think - and if there are other solutions we haven't considered.
> 
> Regards,
> 
> craig
> -- 
> craig pratt
> Caspia Consulting
> craig@ecaspia.com
> 503.746.8008
> 
> 
> 
> 

--
Mark Nottingham   https://www.mnot.net/