<?xml version="1.0" encoding="US-ASCII"?>
<!-- $Id$ -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC3550 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3550.xml">
<!ENTITY RFC5052 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5052.xml">
<!ENTITY RFC5740 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5740.xml">
<!ENTITY RFC5775 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5775.xml">
<!ENTITY RFC6363 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6363.xml">
<!ENTITY RFC6681 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6681.xml">
<!ENTITY RFC6816 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6816.xml">
<!ENTITY RFC6865 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6865.xml">
]>

<rfc category="info" docName="draft-roca-nwcrg-fecframev2-problem-position-01" ipr="trust200902">

<?xml-stylesheet type='text/xsl' href='http://xml.resource.org/authoring/rfc2629.xslt' ?>

<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>

<front>
	<title abbrev="FECFRAMEv2: Requirements and Problem Position">
		FECFRAMEv2: Adding Sliding Encoding Window Capabilities to the FEC Framework: Problem Position
	</title>

	<author fullname="Vincent Roca" initials="V." surname="Roca">
		<organization>INRIA</organization>
		<address>
		  <postal>
		    <street>655, av. de l'Europe</street>
		    <street>Inovallee; Montbonnot</street>
		    <city>ST ISMIER cedex</city>
		    <code>38334</code>
		    <country>France</country>
		  </postal>
		  <email>vincent.roca@inria.fr</email>
		  <uri>http://privatics.inrialpes.fr/people/roca/</uri>
		</address>
	</author>

	<date/>

	<area></area>

	<workgroup>IRTF Network Coding Research Group (NWCRG)</workgroup>

	<keyword>Network Coding</keyword>

	<abstract>
		<t>The Forward Error Correction (FEC) Framework (or FECFRAME) (RFC 6363) has been defined by the FECFRAME IETF WG to enable the use of FEC Encoding with real-time flows in a flexible manner.
		The original FECFRAME specification only considers the use of block FEC codes, wherein the input flow(s) is(are) segmented into a sequence of blocks and FEC encoding performed independently on a per-block basis.
		This document discusses an extension of FECFRAME in order to enable a sliding (potentially elastic) window encoding of the input flow(s), using convolutional FEC codes for the erasure channel, as an alternative to block FEC codes.
</t>
	</abstract>

</front>

<middle>

	<section anchor="sec-introduction" title="Introduction">
	<!-- ==================================== -->

	<t>
The Forward Error Correction (FEC) Framework (or FECFRAME) <xref target="RFC6363"/>, produced by the FECFRAME IETF WG <xref target="fecframe-charter"/>, describes a framework for using Forward Error Correction (FEC) codes with applications in public and private IP networks to provide protection against packet loss.
The framework supports applying FEC to arbitrary packet flows over unreliable transport and is primarily intended for real-time, or streaming, media.
This framework can be used to define Content Delivery Protocols that provide FEC for streaming media delivery or other packet flows.
Content Delivery Protocols defined using this framework can support any FEC scheme (and associated FEC codes) that is compliant with various requirements defined in <xref target="RFC6363"/>.
Thus, Content Delivery Protocols can be defined that are not specific to a particular FEC scheme, and FEC schemes can be defined that are not specific to a particular Content Delivery Protocol.
</t>

<t>
However, it is REQUIRED in <xref target="RFC6363"/> that the FEC scheme operate in a block manner, i.e., the input flow(s) MUST be segmented into a sequence of blocks, and FEC encoding (at a sender/coding node) and decoding (at a receiver/decoding node) MUST be performed independently on a per-block basis.
This approach has a major impact on coding and decoding delays when used with block FEC codes (e.g., <xref target="RFC6681"/>, <xref target="RFC6816"/> or <xref target="RFC6865"/>) since encoding requires that all the source symbols be known at the encoder.
In case of continuous input flow(s), even if source symbols can be sent immediately, repair symbols are necessarily delayed by the block creation time, that directly depends on the block size (i.e., the number of source symbols in this block, k).
This block creation time is also the minimum decoding latency any receiver will experience in case of erasures, since no repair symbol for the current block can be received before.
A good value for the block size is necessarily a good balance between the minimum decoding latency at the receivers (which must be in line with the most stringent real-time requirement of the flow(s)) and the desired robustness in front of long erasure bursts (which depends on the block size).
</t>

<t>
On the opposite, a convolutional code associated to a sliding encoding window (of fixed size) or a sliding elastic encoding window (of variable size) removes this minimum decoding delay, since repair symbols can be generated and sent on-the-fly, at any time, from the source symbols present in the current encoding window.
Using a sliding encoding window mode is therefore highly beneficial to real-time flows, one of the primary targets of FECFRAME.
</t>

<t>
The present document introduces the FECFRAME framework specificities, its limits, and options to extend it to sliding (optionally elastic) encoding windows and convolutional codes.
</t>

	</section>


	<section title= "Notations, Definitions and Abbreviations">
	<!-- =============================================================== -->

		<section title="Requirements Notation">
		<!-- ==================================== -->

		<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
		"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
		document are to be interpreted as described in <xref target="RFC2119"/>.</t>
		</section>

		<section title="Definitions">
		<!-- ==================== -->

<t>This document uses the following definitions, that are mostly inspired from <xref target="RFC5052"/>, <xref target="RFC6363"/> and <xref target="nc-taxonomy-id"/>.</t>

<t>Packet Erasure Channel:</t>
	<t><list style="empty">
	<t> a communication path where packets are either dropped (e.g., by a congested router or because the
	number of transmission errors exceeds the correction capabilities of the physical layer codes) or
	received. When a packet is received, it is assumed that this packet is not corrupted</t>
	</list></t>

<t>Systematic Code:</t>
	<t><list style="empty">
	<t> code in which the Source Symbols are part of the Output Symbols</t>
	</list></t>

<t>Code Rate:</t>
	<t><list style="empty">
	<t> the ratio between the number of Input Symbols and the number of Output Symbols at given coding node.
	The Code Rate belongs to a ]0; 1] interval. A Code Rate close to 1 indicates
	that a small number of Repair Symbols have been produced during the encoding process</t>
	</list></t>

<t>Input Symbol:</t>
	<t><list style="empty">
	<t> a unit of data that is provided as an input to the coding process, in a given coding node.
	It may be a source symbol or an already encoded repair symbol if in-network re-coding is considered</t>
	</list></t>

<t>Output Symbol:</t>
	<t><list style="empty">
	<t> a unit of data that is produced as an output of the coding process, in a given coding node</t>
	</list></t>

<t>Source Symbol:</t>
	<t><list style="empty">
	<t> an original unit of data, before any coding process is applied</t>
	</list></t>

<t>Repair Symbol:</t>
	<t><list style="empty">
	<t> an Output Symbol that is not a Source Symbol</t>
	</list></t>

<t>Application Data Unit (ADU):</t>
	<t><list style="empty">
	<t> The unit of source data provided as payload to the transport layer.
	Depending on the use-case, an ADU may use an RTP encapsulation.</t>
	</list></t>

<t>(Source) ADU Flow:</t>
	<t><list style="empty">
	<t> A sequence of ADUs associated with a transport-layer flow identifier (such as the standard 5-tuple {Source IP address, source port, destination IP address, destination port, transport protocol}).
	Depending on the use-case, several ADU flows may be protected together by the FECFRAME framework.</t>
	</list></t>

<t>ADU Information (ADUI):</t>
	<t><list style="empty">
	<t> a unit of data constituted by the ADU and the associated Flow ID, Length and Padding fields (<xref target="sec-adu-src-symbol-mapping"/>). </t>
	</list></t>

<t>FEC Source Packet:</t>
	<t><list style="empty">
	<t> At a sender (respectively, at a receiver) a payload submitted to (respectively, received from) the transport protocol containing an ADU along with an Explicit Source FEC Payload ID (if present).</t>
	</list></t>

<t>FEC Repair Packet:</t>
	<t><list style="empty">
	<t> At a sender (respectively, at a receiver) a payload submitted to (respectively, received from) the transport protocol containing one repair symbol along with a Repair FEC Payload ID and possibly an RTP header.</t>
	</list></t>

<t>FEC Framework Configuration Information (FFCI):</t>
	<t><list style="empty">
	<t> Information which controls the operation of the FEC Framework.
	The FFCI enables the synchronization of the FECFRAME sender and receiver instances.</t>
	</list></t>

<t>To Be Completed...</t>

		</section>

<!--
		<section title="Notations">
-->
		<!-- ====================== -->

<!--
<t>This document uses the following notations:</t>

<t>
<list style="empty">
<t>CR		denotes the Code Rate</t>
<t>To Be Completed</t>
<t>L		denotes the object transfer length in bytes.</t>
<t>k		denotes the source block length in symbols,
		i.e., the number of source symbols of a source block.</t>
<t>n		denotes the encoding block length, i.e., the number of
		encoding symbols generated for a source block.</t>
<t>E		denotes the encoding symbol length in bytes.</t>
<t>B		denotes the maximum source block length in symbols,
		i.e., the maximum number of source symbols per source block.</t>
<t>max_n	denotes the maximum number of encoding symbols generated
		for any source block.
		This is in particular the number of encoding symbols
		generated for a source block of size B.</t>
</list></t>
		</section>
-->

		<section title="Abbreviations">
		<!-- ====================== -->

<t>This document uses the following abbreviations. </t>

<!-- <t>ESI:		Encoding Symbol ID</t> -->
<!-- <t>FEC OTI:	FEC Object Transmission Information</t> -->
<!-- <t>FPI:		FEC Payload ID</t> -->

<t>NC:</t>
	<t><list style="empty">
	<t> Network Coding</t>
	</list></t>
<t>PT:</t>
	<t><list style="empty">
	<t> RTP Payload Type field, <xref target="RFC3550"/></t>
	</list></t>

		</section>

	</section>

	<section anchor="sec-key-aspects-of-fecframe" title="Key aspects of FECFRAME">
	<!-- ==================================== -->

<t> Let us discuss some key aspects of FECFRAME.</t>

		<section title="FECFRAME is more a shim layer than a protocol instantiation">
		<!-- ==================================== -->

<t>
FECFRAME is not a full featured Protocol Instantiation (unlike ALC <xref target="RFC5775"/> and NORM <xref target="RFC5740"/> for instance).
It is more a shim layer, or more precisely a framework for using FEC inside existing transport protocols.
For instance when FECFRAME is used end-to-end inside a single RTP/UDP stream (the simplest use-case), RTP <xref target="RFC3550"/> and UDP are the transport protocols and FECFRAME is a functional component that performs FEC encoding/decoding and generates RTP compliant repair packets.
Even if specific headers are defined for the associated FEC Scheme, FECFRAME is still not a full featured transport protocol.
</t>

		</section>

		<section title="Details are in each FEC Scheme">
		<!-- ==================================== -->

<t>
In the FECFRAME architecture, most technical details are in the FEC Scheme. In particular a FEC Scheme defines:
<list style="symbols">
	<t> FEC code specifications and associated FEC Encoding ID; </t>
	<t> the way source symbols are created from the flow(s) of incoming packets (see <xref target="sec-adu-src-symbol-mapping"/>); </t>
	<t> signaling for source packets (optional), called Source FEC Payload ID; </t>
	<t> signaling for repair packets (mandatory), called Repair FEC Payload ID; </t>
</list>
</t>

		</section>

		<section title="FECFRAME is pretty flexible">
		<!-- ==================================== -->

<t> FECFRAME is pretty flexible in the way it can be used.
In particular FECFRAME:
<list style="symbols">
	<t> can protect a single RTP flow <xref target="RFC3550"/>, repair packets being themselves RTP packets, possibly multiplexed in the same UDP connection but using a different Payload Type (PT) to distinguish them from source packets.
	This is particularly useful for backward compatibility purposes: non-FECFRAME aware receivers simply drop packets with unknown PT; </t>
	<t> can protect a single source flow that does NOT use RTP, where repair packets are NOT RTP packets either; </t>
	<t> can protect several source flows, from the same source or from several sources, some of them being RTP flows but not necessarily the other ones; </t>
	<t> can generate a single repair flow or multiple repair flows; </t>
	<t> can be used with any upper protocols (e.g., RTP) and transport protocols (e.g., UDP, DCCP) if this latter preserves datagram boundaries;</t>
	<t> can be used with unicast or multicast/broadcast transmissions; </t>
</list>
</t>

		</section>

		<section anchor="sec-fecframe-needs-sdp" title="FECFRAME needs session-level description">
		<!-- ==================================== -->

<t>
FECFRAME works in conjunction with SDP (or a similar protocol) to specify high level per FECFRAME Instance (i.e., per-session) signaling.
This information, called FEC Framework Configuration Information <xref target="RFC6363"/>, describes:
<list style="symbols">
	<t> the incoming flows (content description and flow identification); </t>
	<t> the outgoing flows, for source and repair packets; </t>
	<t> what FEC Scheme is used, identified via the FEC Encoding ID; </t>
	<t> and the FEC Scheme specific parameters. </t>
</list>
In practice, the FEC Scheme is valid for the whole FECFRAME Instance duration, since no update mechanism has been defined to carry a new SDP session description reliably and in real-time to all the potential receivers.
This is different from ALC or NORM where the FEC Scheme selection is made on a per-object manner (rather than per-session).
</t>

		</section>

	</section>

	<section anchor="sec-appli-fecframe-to-nc" title="Application of FECFRAME (RFC 6363) to network coding use-cases: a discussion">
	<!-- ==================================== -->

<t>
The FECFRAME framework has a certain number of features and restrictions.
We discuss each of them below, at the light of the use-cases identified for Network Coding.
</t>

		<section anchor="sec-blk-vs-convolutional" title="Block versus convolutional codes">
		<!-- ==================================== -->

<t>
FECFRAME, as described in <xref target="RFC6363"/>, MUST be associated to block FEC codes. For instance (<xref target="RFC6363"/>, section 5.1) says:
<list style="empty">
<t>
   "1.  Construction of a source block from ADUs.  The FEC code will be
        applied to this source block to produce the repair payloads."</t>
</list>
Therefore the input flow(s) are segmented into a sequence of blocks, FEC encoding being performed independently on a per-block basis.
</t>

<t>
However this is not a fundamental limitation, in the sense that the same FECFRAME architecture can be used with sliding (potentially elastic) encoding windows, associated with convolutional codes.
To that purpose it is sufficient:
<list style="symbols">
	<t> to update <xref target="RFC6363"/> adding the support of sliding (potentially elastic) encoding windows along with the source block approach; </t>
	<t> to specify dedicated FEC Schemes, working with convolutional codes.
	All the details of the codes, associated signaling, creation of the sliding encoding windows and creation of source symbols will be defined in these FEC Schemes; </t>
</list>
</t>

		</section>

		<section anchor="sec-e2e-vs-recoding" title="End-to-end versus in-network re-coding">
		<!-- ==================================== -->

<t>
The FECFRAME architecture, as specified in <xref target="RFC6363"/>, MUST feature a single encoding node and a single decoding node.
These nodes may be the source and destination nodes, or may be middle-boxes, or any combination.
</t>

<t>
The question of having multiple in-network re-coding operations is not considered in <xref target="RFC6363"/>.
The question whether this is feasible and appropriate, given the typical FECFRAME use-cases, is an open question that remains to be discussed.
</t>

		</section>

		<section anchor="sec-single-vs-multi-src" title="Single versus multi-sources, intra versus inter-flows coding">
		<!-- ==================================== -->

<t>
FECFRAME, as specified in <xref target="RFC6363"/>, can globally protect several flows that can originate either from a single source or from multiple sources. 
This also means that FECFRAME can perform both intra-flow coding or inter-flows coding.
The only requirement is that those flows be identified and signaled to the FECFRAME encoder and decoder via the FEC Framework Configuration Information (e.g., it can be detailed in the SDP description).
</t>

<t>
From this point of view, FECFRAME is already in line with advanced network-coding use-cases.
</t>

		</section>

		<section anchor="sec-single-vs-multi-paths" title="Single versus multi-paths">
		<!-- ==================================== -->

<t>
FECFRAME, as specified in <xref target="RFC6363"/>, does not specify nor restrict how the source flow(s) and repair flow(s) are to be transmitted: whether they go through the same path (e.g., when they are sent to the same UDP connection) or through multiple paths is irrelevant to FECFRAME as it is an operational and management aspect.
However, it is anticipated that when several repair flows are generated, offering different protections levels (e.g., through different code-rates), these repair flows will often use different paths, to better accommodate receiver heterogeneity.
</t>

<t>
From this point of view, FECFRAME is already in line with advanced network-coding use-cases.
</t>

		</section>

		<section anchor="sec-transport-vs-network-layer" title="Application at the transport versus network versus MAC layer">
		<!-- ==================================== -->

<t>
FECFRAME, as specified in <xref target="RFC6363"/>, has been designed only with the transport layer use-case in mind.
It MUST be located between the application and transport layers.
</t>

<t>
The question of having FECFRAME used in lower protocol layers is not considered in <xref target="RFC6363"/>.
Whether this is feasible and appropriate, given the typical FECFRAME use-cases, is an open question that remains to be discussed.
</t>

		</section>

	</section>



	<section anchor="sec-archi-aspects-for-fecframev2" title="A few key architectural aspects for FECFRAMEv2">
	<!-- ==================================== -->

<t>
A few key architectural aspects follow, proving the feasibility of adding sliding encoding window support to FECFRAMEv2.
We assume hereafter that FECFRAMEv2 follows the initial spirit of FECFRAME, i.e., is applied in end-to-end (see <xref target="sec-e2e-vs-recoding"/>).
Extending FECFRAMEv2 to other situations, for instance with in-network re-coding, is not considered here and remains to be discussed.
</t>

		<section title="High level view of FECFRAMEv2 in sliding encoding window mode">
		<!-- ==================================== -->

<figure anchor="fig-archi-fecframev2" title="Architecture of FECFRAMEv2 in sliding encoding window mode, at a sender/coding node.">
<artwork><![CDATA[
+----------------------+
|     Application      |
+----------------------+
           |
           | (1) Application Data Units (ADUs)
           v 
+----------------------+                           +----------------+
|   FEC Framework v2   |                           |                |
|                      |-------------------------->|   FEC Scheme   |
|(2) Update of sliding | (3) Source Symbols of     |                |
|    encoding window   |     the sliding window    |                |
|                      |<--------------------------|                |
|                      | (4) Explicit Source       |                |
|(7) Construct FEC     |     FEC Payload ID(s)     |(5) FEC Encoding|
|    source and repair |<--------------------------|    (optional)  |
|    packet(s)         | (6) Repair FEC Payload ID |                |
+----------------------+     + Repair symbol(s)    +----------------+
           |
           | (8) FEC source packets and FEC repair packets
           v 
+----------------------+ 
|   Transport Layer    | 
|     (e.g., UDP)      |
+----------------------+ ]]></artwork>
</figure>

<t>
<xref target="fig-archi-fecframev2"/> (adapted from <xref target="RFC6865"/>) illustrates the general architecture of FECFRAMEv2 when working in sliding encoding window mode.
The difference with respect to the <xref target="RFC6363"/> architecture lies in steps 2 to 6.
Instead of creating a source block, composed of a certain number of ADUs plus their associated flow/length/padding information
(see for instance <xref target="RFC6865"/>), FECFRAMEv2 in sliding encoding window mode continuously updates this window (step 2) and communicates
the set of symbols to the FEC Scheme (step 3).
This latter returns the Explicit Source FEC Payload ID(s) (step 4) when applicable so that the new symbol(s) can be sent immediately (steps 7 and 8 limited to FEC source packets).
When FECFRAMEv2 needs to send one or several FEC repair packets, it asks the FEC Scheme to create one or several repair symbols (step 5) along with their Repair FEC  Payload ID (step 6).
Note that depending on the FEC scheme, the number repair symbols may be limited at a certain point of time.
The packets are then sent (steps 7 and 8).
</t>

<t>
When FECFRAMEv2 work in the traditional block mode, Figure 2 and Figure 3 of <xref target="RFC6363"/> remain valid.
</t>

		</section>

		<section anchor="sec-adu-src-symbol-mapping" title="ADU / source symbol mapping">
		<!-- ==================================== -->

<t>
Let us now detail the ADU / source symbol mapping.
As in FECFRAME, each ADU is first prepended with its {flow ID, length} information (respectively the F and L fields of <xref target="fig-adui-and-window-creation-exple"/>), and potentially zero padded to align with the target symbol length (see below) (Pad field of <xref target="fig-adui-and-window-creation-exple"/>).
This augmented ADU is called ADUI (see <xref target="fig-adui-and-window-creation-exple"/>).
<!-- XXX: to be checked: Note that in situations where a single source flow is considered, the flow ID may be omitted. -->
</t>

<t>
Then source symbols are mapped to ADUIs.
There is not necessarily a 1-1 bijection between ADUIs and symbols, because incoming packets can have largely varying sizes.
In that case it MAY make sense to have small symbols of size significantly lower than the PMTU, as in <xref target="RFC6681"/>.
On the opposite, <xref target="RFC6816"/> and <xref target="RFC6865"/> more conservatively associate one symbol per ADUI.
(NB: this is different from ALC or NORM where source and repair packets are all of the same size, except maybe the packet containing the last source symbol of an object).
</t>

<t>
The source and repair symbol length can therefore be determined in different ways. 
It can be of fixed length, indicated in the FEC Framework Configuration Information (FFCI).
Otherwise, for situations where there is a single source symbol per ADUI, the symbol length:
	<list style="symbols">
	<t> with FECFRAMEv2 in block mode or FECFRAME, can be dynamic and chosen on a per-block basis (see <xref target="RFC6865"/>, section 4.3, "E" parameter); </t>
	<t> with FECFRAMEv2 in window mode, can be dynamic and chosen on a per-window basis.
	In that case the length of repair symbols will dynamically evolve as well in order to be equal to the maximum ADUI size in the encoding window at the time of encoding; </t>
	<t> in all cases, can be statically defined, for instance of the maximum (P)MTU size minus the various header sizes; </t>
	</list>
</t>
<!--
<t><list style="empty">
<t> - - Editor's note: (Morten comment) size could be equal to the maximum ADUI size included in a repair symbol which does not have much impact on high field codes, but for binary/sparse codes it may. - - </t>
</list></t>
-->

<t>
<xref target="fig-adui-and-window-creation-exple"/> illustrates the creation of the ADUI, from incoming ADUs, and the correspondence to source symbols in the case there is a single source symbol per ADUI.
It assumes the symbol length is aligned with the maximum ADUI length currently in the sliding encoding window (here corresponding to the ADU of index i+2).
</t>

<figure anchor="fig-adui-and-window-creation-exple" title="ADUI and source symbols, simple case with a single source symbol per ADUI, of length equal to the maximum ADUI size in the sliding encoding window.">
<artwork><![CDATA[
   Symbol Length (i.e., max ADU size in window + 3)
<------------------------------------------------->
+----+------+----------------------+--------------+  
|F[i]| L[i] | ADU[i]               |  Pad[i]      | => src symbol i
+----+------+----------+-----------+--------------+  
|Fi+1|L[i+1]| ADU[i+1] |              Pad[i+1]    | => src symbol i+1
+----+------+----------+--------------------------+  
|Fi+2|L[i+2]| ADU[i+2] (currently the largest ADU)| => src symbol i+2
+----+------+--------+----------------------------+  
|Fi+3|L[i+3]|ADU[i+3]|                Pad[i+3]    | => src symbol i+3
+----+------+--------+----------------------------+  
]]></artwork>
</figure>

<t>
When FECFRAMEv2 works in a sliding encoding window mode and the symbol length is chosen on a per-window basis, coding operations can require to adjust the L and Pad fields of each ADUI present in the current sliding encoding window. 
Indeed, as the maximum length of ADUs in the window varies, the various paddings and therefore L fields need to be updated accordingly.
A FECFRAMEv2 implementation must accommodate with this constraint.
</t>

		</section>

		<section anchor="sec-sliding-encoding-window-management" title="Sliding encoding window management">
		<!-- ==================================== -->

<t>
Let us now detail the sliding window update process at a sender.
Two kinds of limitations exist that impact the sliding window management:
</t>
<t><list style="symbols">
	<t> at the FEC Scheme level: this latter can have internal or practical limitations (e.g., for complexity reasons) that limit the number of source symbols in the encoding window;</t>
	<t> at the FECFRAMEv2 instance level: the source flows can have real-time constraints that limit the number of source symbols in the encoding window;</t>
</list></t>

<t>
The most stringent limitation defines the maximum window size in terms of either number of source symbols or number of ADUs (depending on the relationship between them, see <xref target="sec-adu-src-symbol-mapping"/>, they can be equal or not).
</t>

<t>
Source symbols are added to the sliding encoding window as ADUs arrive.
</t>

<t>
Source symbols (and the corresponding ADUs) are removed from the sliding encoding window:
	<list style="symbols">
	<t> after a certain delay, for situations where the sliding encoding window is managed on a time basis.
		The motivation is that an old ADU of a real-time flow becomes useless after a certain delay.
		The ADU retention delay in the sliding encoding window is therefore initialized according to the real-time features of incoming flow(s); </t>
	<t> once the sliding encoding window has reached its maximum size, for situations where there is an upper limit to the sliding encoding window; </t>
	<t> when the sliding encoding window is of fixed size, the oldest symbol is removed each time a new symbol is added; </t>
	<t> if the sender knows that a particular ADU has been correctly received by the receiver(s), the corresponding source symbol(s) is(are) removed.
	Of course this mechanism requires that an acknowledgement mechanism be setup to inform the FECFRAMEv2 sender of good ADU reception, which is out of the scope of FECFRAMEv2.
	Whether or not this is desirable is an open question; </t>
	</list>
</t>

		</section>

		<section anchor="sec-about-symbol-identifiers" title="About symbol identifiers">
		<!-- ==================================== -->

<t>
Any **source** symbol of a flow MUST be uniquely identified during the full duration where this symbol is useful.
</t>

<t>
Depending on the FEC Scheme being used, a **repair** symbol of a flow MAY or MAY not need to be uniquely identified during the full duration where this symbol is useful.
For instance, being able to identify a repair symbol is OPTIONAL with Random Linear Codes (RLC), since the coding window content and associated coding vector are transmitted within the Repair FEC Payload ID.
But being able to identify a repair symbol is REQUIRED with FEC Schemes that use this symbol identifier during the encoding and decoding processes (this is the case for instance with any block FEC code and some of the convolutional FEC codes).
</t>

<t>
In block mode, the so called encoding symbols are uniquely identified both by their Source Block Number (SBN) and Encoding Symbol ID (ESI), the first k ESI values denoting source symbols, the remaining n-k ESI values the repair symbols <xref target="RFC5052"/>.
In sliding encoding window mode, there is no SBN concept (as there is no block) and the ESI space cannot be split into source and repair identifiers as before.
Therefore FECFRAMEv2 adds the the Repair (R) bit to distinguish two identifier spaces, one for source symbols (when the "R" bit is 0) and one for repair symbols (when the "R" bit is 1).
</t>

<figure anchor="fig-symbol-identifier-8" title="Symbol Identifier, 8-bit version."> 
<artwork><![CDATA[
 0              
 0 1 2 3 4 5 6 7 
+-+-+-+-+-+-+-+-+
|R| IDV (7 bits)|
+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>

<figure anchor="fig-symbol-identifier-16" title="Symbol Identifier, 16-bit version."> 
<artwork><![CDATA[
 0                   1          
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|R|  ID Value (IDV)  (15 bits)  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>

<t>
<xref target="fig-symbol-identifier-8"/> and <xref target="fig-symbol-identifier-16"/> illustrate Symbol ID (SID) format for situations where 8 bits or 16 bits are sufficient to uniquely identify any symbol.
Other formats (e.g., 24-bit or 32-bit SID formats) are possible when meaningful.
The SID is composed of:</t>

<t> Repair (R) flag (1-bit field):</t>
	<t><list style="empty">
	<t> when "R" is 0, it indicates this is a source symbol, and when "R" is 1, indicates this is a repair symbol;</t>
	</list></t>

<t> ID Value (IDV) 7-bit (resp. 15-bit) field:</t>
	<t><list style="empty">
	<t> sequence number of a symbol, that may be either a source or repair symbol, depending on the "R" flag.
	The IDV starts from 0, is incremented in a monotonic way, and wraps-around to zero after reaching the maximum value permitted by the IDV field size;</t>
	</list></t>

<t>
Therefore each source (and optionally repair) symbol of a flow is uniquely identified by its Symbol ID: SID = {R; IDV}.
Different flows have different flow identifiers within the current FECFRAMEv2 instance, so the {flowID, SID} tuple enables to identify any symbol.
</t>

<t>
IDV being a b-bit long field (e.g., with b=7 or 15 in the above figures), wrap-arounds will occur after the maximum value is achieved.
This has two consequences:
	<list style="symbols">
	<t> the maximum sliding encoding window size MUST be at most equal to 2^^b; </t>
	<t> in situations where the network may delay packets significantly, there is a risk of confusion.
	A symbol significantly delayed during transmission, that has been removed from the current sliding encoding window and after an IDV wrap-around, may be mis-interpreted as a fresh symbol.
	Note that a timestamp information carried in this packet may help identifying this situation, however this cannot be considered as the general case (e.g., flows do not necessarily use RTP framing).
	A security margin is therefore needed that consist of a value for b sufficiently high to avoid such confusions no matter what happens.
	What security margin to consider is a deployment decision that is out of the scope of this document.
	</t>
	</list>
</t>

		</section>

		<section anchor="sec-about-convolutional-code" title="New convolutional FEC schemes">
		<!-- ==================================== -->

<t>
A convolutional FEC Scheme for the erasure channel is required for FECFRAMEv2 working in sliding encoding window mode.
</t>

<t>
Several convolutional codes are possible, Random Linear Codes (RLC) being one option among others.
Depending on the code, the Source and Repair FEC Payload IDs will be adapted.
Some codes will also require the transmission of the coding vectors in addition to the current sliding window composition.
These considerations, among others, will be specified as part of the FEC Scheme.
</t>

		</section>

		<section anchor="sec-update-sdp" title="Updating the SDP session-level description">
		<!-- ==================================== -->
<t>
For FECFRAMEv2, the SDP session-level description needs to indicate whether:
</t>
<t><list style="symbols">
	<t> coding follows a block approach; </t>
	<t> coding follows a sliding encoding window approach; </t>
	<t> coding follows both of them: for instance a FEC repair packet flow may use one approach and another FEC repair packet flow, sent on a different UDP connection, may use the other one.
	This could be useful in order to preserve backward compatibility with legacy receivers, or in order to combine the advantages of both coding approaches; </t>
</list></t>

<t>
Other details (list to be defined) need to be specified in the session-level description.
</t>

		</section>

	</section>


	<section anchor="sec-extending-fecframe" title="Relationships with the Tetrys and DNC proposals">
	<!-- ==================================== -->

		<section anchor="sec-is-different-from-tetrys" title="Is FECFRAMEv2 fundamentally different from Tetrys?">
		<!-- ==================================== -->

<t>
The target use-cases for FECFRAME and Tetrys <xref target="tetrys-id"/> are rather similar: essentially end-to-end, with unicast or multicast flows, with a single or multiple sources and flows.
</t>

<t>
In terms of coding, FECFRAMEv2 and Tetrys follow the same sliding window approach, potentially elastic.
The main difference comes from the manner the sliding window progresses.
</t>

<t>
Feedback flows are missing from FECFRAMEv2, but probably exist in the upper RTP/RTCP protocol (if used), in a simplified manner as they provide global statistics rather than per source packet reception/decoding status.
Adding a detailed symbol-level acknowledgement mechanism to FECFRAMEv2, although feasible, is not in line with the original FECFRAME philosophy.
Tetrys also performs code rate adjustment, based on feedback information.
The same can be done with FECFRAMEv2 in case an RTCP feedback flow is available, with global reception/loss statistics.
</t>

<t>
If Tetrys is a full featured protocol, with a specific header, FECFRAME is more a shim layer.
Whether it is appropriate or not to turn FECFRAMEv2 into something more elaborate, thereby breaking backward compatibility and the initial philosophy of FECFRAME, remains an open question.
</t>
		</section>

		<section anchor="sec-" title="Is FECFRAMEv2 fundamentally different from Dynamic Network Coding?">
		<!-- ==================================== -->

<t>
Some of the key concepts of DNC <xref target="dnc-id"/> can be added to FECFRAMEv2 fairly easily: coding decisions and flow management decisions may depend on timing aspects thanks to a timestamp carried in the various packets.
Very often, real-time flows will already contain a timestamp as part of their RTP header which facilitates these decisions.
</t>

		</section>

	</section>

	<!-- ======================================================================= -->


	<section anchor="security" title="Security Considerations">
	<!-- ==================================== -->

		<t>TBD</t>

	</section>

	<section anchor="privacy" title="Privacy Considerations">
	<!-- ==================================== -->

		<t>TBD</t>

	</section>

	<section anchor="iana" title="IANA Considerations">
	<!-- ==================================== -->

		<t>N/A</t>

	</section>

	<!--
	<section title="Acknowledgments">

		<t>...</t>

	</section>
	-->

</middle>

<back>
	<references title="Normative References">
		<?rfc include='reference.RFC.2119'?>
		<?rfc include='reference.RFC.6363'?>
		<?rfc include='reference.RFC.5052'?>
		<?rfc include='reference.RFC.3550'?>
	</references>

	<references title="Informative References">

		<reference anchor="nc-taxonomy-id">
			<front>
				<title>Network Coding Taxonomy</title>
				<author initials="V" surname="Firoiu" fullname="Victor Firoiu"><organization/></author>
				<author initials="B" surname="Adamson" fullname="Brian Adamson"><organization/></author>
				<author initials="V" surname="Roca" fullname="Vincent Roca"><organization/></author>
				<author initials="C" surname="Adjih" fullname="Cedric Adjih"><organization/></author>
				<author initials="J" surname="Bilbao" fullname="Josu Bilbao"><organization/></author>
				<author initials="F" surname="Fitzek" fullname="Frank Fitzek"><organization/></author>
				<author initials="A" surname="Masucci" fullname="Antonia Masucci"><organization/></author>
				<author initials="M" surname="Montpetit" fullname="Marie-Jose Montpetit"><organization/></author>
				<date month="November" day="11" year="2014"/>
			</front>
			<seriesInfo name="Internet-Draft" value="draft-irtf-nwcrg-network-coding-taxonomy-00"/>
			<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-irtf-nwcrg-network-coding-taxonomy-00.txt"/>
		</reference>

		<reference anchor="tetrys-id">
			<front><title>Tetrys, an On-the-Fly Network Coding protocol</title>
				<author initials="J" surname="Detchart" fullname="Jonathan Detchart"><organization/></author>
				<author initials="E" surname="Lochin" fullname="Emmanuel Lochin"><organization/></author>
				<author initials="J" surname="Lacan" fullname="Jerome Lacan"><organization/></author>
				<author initials="V" surname="Roca" fullname="Vincent Roca"><organization/></author>
				<date month="March" day="9" year="2015"/>
			</front>
			<seriesInfo name="Internet-Draft" value="draft-detchart-nwcrg-tetrys-01"/>
			<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-detchart-nwcrg-tetrys-01.txt"/>
		</reference>

		<reference anchor="dnc-id">
			<front><title>Dynamic Network Coding</title>
				<author initials="M" surname="Montpetit" fullname="Marie-Jose Montpetit"><organization/></author>
				<author initials="V" surname="Roca" fullname="Vincent Roca"><organization/></author>
				<author initials="j" surname="jonathan.detchart@isae.fr" fullname="jonathan.detchart@isae.fr"><organization/></author>
				<date month="March" day="9" year="2015"/>
			</front>
			<seriesInfo name="Internet-Draft" value="draft-montpetit-dynamic-nc-00"/>
			<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-montpetit-dynamic-nc-00.txt"/>
		</reference>

		<?rfc include='reference.RFC.5740'?>
		<?rfc include='reference.RFC.5775'?>

		<?rfc include='reference.RFC.6681'?>
		<?rfc include='reference.RFC.6816'?>
		<?rfc include='reference.RFC.6865'?>

		<reference anchor="fecframe-charter">
		  <front>
		    <title>FEC Framework (fecframe) charter</title>
		    <author initials="IETF" surname="FECFRAME WG"></author>
		    <date month="March" year="2013" />
		  </front>
		  <seriesInfo name="URL:" value="http://www.ietf.org/wg/concluded/fecframe.html" />
		  <format target="http://www.ietf.org/wg/concluded/fecframe.html" type="HTML" />
		</reference>
	</references>

</back>

</rfc>

