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

Craig Pratt <craig@ecaspia.com> Tue, 19 April 2016 10:04 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 E09AF12D10C for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 19 Apr 2016 03:04:59 -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 eAv8KKvs0dFj for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 19 Apr 2016 03:04:58 -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 2EBEE12D666 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 19 Apr 2016 03:04:58 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1asSSO-0007We-Bq for ietf-http-wg-dist@listhub.w3.org; Tue, 19 Apr 2016 10:00:32 +0000
Resent-Date: Tue, 19 Apr 2016 10:00:32 +0000
Resent-Message-Id: <E1asSSO-0007We-Bq@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 1asSSI-0007Og-Mq for ietf-http-wg@listhub.w3.org; Tue, 19 Apr 2016 10:00:26 +0000
Received: from mail-pf0-f174.google.com ([209.85.192.174]) by maggie.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <craig@caspiaconsulting.com>) id 1asSSG-0006bE-4P for ietf-http-wg@w3.org; Tue, 19 Apr 2016 10:00:26 +0000
Received: by mail-pf0-f174.google.com with SMTP id 184so5443711pff.0 for <ietf-http-wg@w3.org>; Tue, 19 Apr 2016 03:00:03 -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=vjBqZlVYl4bddTpaAvqkVbLYz/tPPHKxxusQg7LJTv0=; b=X1ZQjJ+PUqC5v7PHLfesM1y7LTNvjfdqUgog1QSsjOGPXhFJJvIHDfcZPyzeQroUqj UjLn9/3Txlh0L/ciYoaDMOBYG8ANk9bKpc/UF3rpxnAG5aTb1Xlf8aJD920dor5rLnx7 9q6RhOB1vZtyxrxKj0BngAh9jCuf9Su4UhKWqp4pSxJRpNsR59+RK8ag66x/n03ur5Gh dUzXMcByCDH9KPD4octzbKSKHH9okjxzA+iS8l5w/LyOYdcjhqWWhb12RtWXVTmU4G+8 lRZ/haa3AAv5KIrJLhk2whdRaMgBQMiWwFySkGmnCWGIkh8aPEnax3bm7vf7qUUy/iBa 8VgQ==
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=vjBqZlVYl4bddTpaAvqkVbLYz/tPPHKxxusQg7LJTv0=; b=PtjI9nnRbs82VcGbGuwdYxrqC4x5CIx4TPZ9k5XSnATtWFRjG8elrETXT1cKETCca/ FjA6752XWvuz8MMGBjdU7ooI9YFKB4c3Z52PWqWTd0bCYB/lDd+eZsz+2iU0VxkETfdE nZJqUJg6thhCTr54JPyrFOcBrR9X2DnR+HwAsYcXBM9ECv//AFvbGUhZojBlFH/9iC8J X0ZGrd3cnM6tgBiU1tEMEiAw+SqlC7YMAPOAUPOn8twO4Fy18taV6PvFRgDu0HF5hbyE mIlXAoMMjZgXh1cxX0DX2Q9q7Mb7+o4YSKsig41NPheezwN0NMNvkux3LrPo71SaNpeo +BUA==
X-Gm-Message-State: AOPr4FUQWOaZhhq9qfLBFPEvCGhR6L9kqQjIHSEmZ7avOKrFHnVjcZNjiWCzGGLGUWW0Gg==
X-Received: by 10.98.24.208 with SMTP id 199mr2341209pfy.160.1461059997652; Tue, 19 Apr 2016 02:59:57 -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 9sm89715333pfm.10.2016.04.19.02.59.56 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 19 Apr 2016 02:59:56 -0700 (PDT)
To: Mark Nottingham <mnot@mnot.net>
References: <57102718.7010900@ecaspia.com> <432331E0-4FD1-44E6-8F50-C12BF1852192@mnot.net>
Cc: IETF HTTP BIS <ietf-http-wg@w3.org>
From: Craig Pratt <craig@ecaspia.com>
Organization: Caspia Consulting
Message-ID: <5716019B.4030104@ecaspia.com>
Date: Tue, 19 Apr 2016 02:59:55 -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: <432331E0-4FD1-44E6-8F50-C12BF1852192@mnot.net>
Content-Type: text/html; charset="windows-1252"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=209.85.192.174; envelope-from=craig@caspiaconsulting.com; helo=mail-pf0-f174.google.com
X-W3C-Hub-Spam-Status: No, score=-4.3
X-W3C-Hub-Spam-Report: AWL=-0.409, 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: maggie.w3.org 1asSSG-0006bE-4P 1216e8c5f7deb37322efdba180c584af
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/5716019B.4030104@ecaspia.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31501
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 4/19/16 12:19 AM, Mark Nottingham wrote:
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" rel="nofollow">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,
[cp] Yeah, I can see where that could be a problem. I'll come up with another name for the Range Unit. How about "b-live"?

Thx,

cp



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" rel="nofollow">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/" rel="nofollow">https://www.mnot.net/



--

craig pratt

Caspia Consulting

craig@ecaspia.com

503.746.8008