17
Code On Network Coding Technologies LLC Random Linear Network Coding A Tutorial A codeon white paper September 2013

Code on White Paper RLNC a Tutorial

  • Upload
    brcost

  • View
    47

  • Download
    5

Embed Size (px)

Citation preview

Page 1: Code on White Paper RLNC a Tutorial

Code On Network Coding Technologies LLC

Random Linear Network CodingA Tutorial

A codeon white paper

September 2013

Page 2: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial 2

Contents

Summary 3

Coding Principle 5

RLNC Transport: Enabling Network Virtualization 6

Coding Versatility 6

Recoding 8

Multipath Channel Bonding 9

Code-Aware Protocols 11

RLNC Storage: Enabling Seamless Distribution 13

Optimization of Storage Resources 13

Storage Versatility 15

New Distribution Models 16

Novel Content Protection Paradigms 16

A codeon white paper

Page 3: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial 3

Summary

RANDOM L INEAR NETWORK CODING (RLNC) TECHNOLOGY is aflexible, next-generation coding scheme based on linear algebra. Thesimplicity of its coding principle allows the code to be transported orstored along with data. The resulting versatility is unique in the field ofcoding and information technology, as it enables operations that werenot previously possible with traditional encoding schemes.

In contrast, traditional encoding schemes such as block codes or ratelesscodes are rigid in that all stored or transported data units come from apredesigned code and all information must be received before decodingis possible. Existing coding technologies are all end-to-end systems,with a single encoder and decoder, while any intermediate nodes areunable to contribute to the coding operations. As such, conventionalcoding schemes require new layers of coding and overhead in orderto provision additional redundancy to a previously coded data flow orstored file. These systems are also standalone, unable to use uncodedor differently encoded data to assist with decoding.

Code Capabilities RLNC RatelessCodes

BlockCodes Characteristics / Benefits

Erasure Correction 4 4 4 Corrects for missing or corrupted data packets

Encode data in a sliding window 4 8 8Coding matches protocol behavior ä fewerretransmissions

Code is carried within eachpacket 4 8 8 Eliminates tracking overhead

Composability without decoding(adding incremental redundancy) 4 8 8 Only adds redundancy when and where needed

Completely distributed operation 4 8 8 Enables stateless management

Able to generate valid codes fromcoded or uncoded packets 4 8 8 Gradual implementation; no forklift

Decode using uncoded packets 4 8 8 No forklift; implementation tunability

Table 1: Next-generation capabilities ofRandom Linear Network Coding.

A codeon white paper

Page 4: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial

Table 1 lists the major capabilities of RLNC compared to conventionalrateless and block codes. The remainder of this paper introduces thosenew capabilities. Use cases are also included throughout the documentto illustrate the potential gains in specific deployment scenarios.

A codeon white paper 4

Page 5: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial 5

Coding Principle

RANDOM L INEAR NETWORK CODING (RLNC) combines a number ofdata entities such as packets or file sectors by computing linear combi-nations of their constituting symbols. Figure 1 depicts an example wherethree packets are combined. First, a random coefficient is generated foreach uncoded, or native, packet. Symbol-wise coding is then performedto generate the coded packet. A symbol may represent any unit of digitaldata such as bit, byte, packet, frame, drive sector, etc. Each symbol ofthe resulting coded packet is a linear combination of three correspondingsymbols in the native packets.

Figure 1: Random Linear NetworkCoding Principle.RLNC enables groundbreaking gains in both transport and storage of

information. Generating the coefficients randomly and embedding themwithin the data eliminates the need for tracking state, thus simplifyingreliability operations and creating new information technology paradigms.

A codeon white paper

Page 6: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial 6

RLNC Transport: Enabling Network Virtualization

AS A TRANSPORT TOOL , RLNC can act as a unifying connection in-terface to manage the complexity of multiple network paths, protocols,tunneling and transmission technologies. Such a simplifying feature issimilar to storage virtualization, where storage automation algorithmscreate a unified drive or cloud interface to manage the underlying com-plexity of multiple drives, clouds, speeds, and I/O technologies. As anetwork virtualization enabler, RLNC leverages the available processorspeeds in order to optimize throughput, delay, or other target perfor-mance and cost parameters. RLNC’s network virtualization capabilitystems from four of RLNC’s unique features: coding versatility, recoding,multipath channel bonding, and code-aware protocol support. Each ofthose features is described below.

Coding Versatility

RLNC is a flexible code that allows for multiple different transport schemeswhile using simple linear algebra to decode. Figure 2 (left) shows threedifferent encoding schemes. In block coding, RLNC operates as a con-ventional block code, where packets are assembled in blocks and thencoded together.

Although block coding is not unique to RLNC, the RLNC’s unique codeembedding feature yields novel coding paradigms. For instance, RLNCcan recode encoded packets at different network nodes and layerswithout need for any prior decoding. A recoding node combines receivedcoded packets using newly generated random coefficients. Recodingenables the coding process to adjust to link-level losses along a pathwithout need for any intermediate decoding. This results in the optimalallocation of overhead, as described in the recoding section below.

A codeon white paper

Page 7: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial

Figure 2: Multiple Encoding Schemes.

Also owing to RLNC’s code embedding property, RLNC has the exclu-sive capability of adapting transport protocols. The best illustration isa technique where the packets to be encoded are determined by theposition and width of a sliding window. Such a method enables un-precedented levels of efficiency for the Transmission Control Protocol(TCP), since the ubiquitous transport-layer protocol also operates usinga sliding window. Sliding window encoding is further described in thecode-aware protocol section below.

Decoding reverses the linear operations of Figure 1 through Gaussianelimination. Although coding and recoding can be combined and appliedat various network layers and locations, decoding need only occur onceat the destination node. Importantly, RLNC can use both coded anduncoded packets to decode, leading to easier integration with existingdistributed systems. Besides, by dynamically selecting the right RLNCparameters (e.g., block size), RLNC makes it possible to trade through-put for latency in real time. Such a dynamic throughput-delay tradeoffcapability is expected to become a major QoE tool in transport1.

1 W. Zeng, C.T.K. Ng, M. Medard; JointCoding and Scheduling Optimizationin Wireless Systems with VaryingDelay Sensitivities. arXiv:1202.0784(2012)

A codeon white paper 7

Page 8: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial

Demonstrated RLNC Implementations

RLNC has been successfully demonstrated at a numberof communication layers, usually as a software patch2, butsometimes integrated within the kernel3or even the chiphardware4. Importantly, RLNC can be deployed entirelyat the application-layer, with no changes to the underlyinginfrastructure2,3.

Recoding

2 M. Kim, J. Cloud, A. ParandehGheibi,L. Urbina, K. Fouli, D. Leith, M. Medard;Network Coded TCP (CTCP). arXiv:1212.2291v3 (2013)

3 S. Teerapittayanon, K. Fouli, M.Medard, M.-J. Montpetit, X. Shi, I.Seskar, A. Gosain; Network Coding asa WIMAX Link Reliability Mechanism.arXiv: 1208.4766 (2013)4 G. Angelopoulos, A. Paidimarri, A.P.Chandrakasan, M. Medard; Experimen-tal Study of the Interplay of Channeland Network Coding in Low PowerSensor Applications. ICC WCS 2013

Recoding enables RLNC to uniquely adjust its coding overhead to localnetwork conditions. In the toy example of Figure 3, RLNC recoding iscontrasted with conventional end-to-end coding. The common scenariois the transmission of a 20-packet file from source (S) to destination (D)across a tandem network where each of the three hops has a 10% packetloss. The example simulates the quality of each link by showing packetlosses in red above each link. End-to-end coding naturally requires theprovisioning of all the required redundancy at the source node. In thisexample, this redundancy amounts to 37% of the native file size.

Figure 3: Recoding vs. conventionalend-to-end coding.

A codeon white paper 8

Page 9: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial

Recoding, on the other hand, enables RLNC to renew the redundancy ateach intermediate node without need for decoding. RLNC’s random co-efficient generation and code embedding features allow any intermediatenode to participate in the coding process, in particular by recombiningreceived packets and by generating new redundancy packets. As a re-sult, the required redundancy for RLNC does not exceed the worst-caseredundancy required at any hop, 11% in this example. Recoding hencemakes RLNC a uniquely composable code that is capable of addingredundancy only when and where needed.

Multipath Channel Bonding

RLNC can seamlessly combine variable-rate flows without complexcoordination5,6. Figure 4 illustrates how RLNC can be used to enablesoftware-defined channel bonding in heterogeneous networks.

Figure 4: RLNC supports multipathoperation without complex scheduling.In the depicted scenario, RLNC allows a wireless edge user to down-

load a large file by seamlessly combining channels with wide-ranging

5 J. Cloud, F. du Pin Calmon, W. Zeng,and M. Medard. Multi-Path TCP withNetwork Coding for HeterogeneousNetworks. Information Theory andApplications Workshop (ITA) 2012

loss, latency and bandwidth characteristics, without need for complexscheduling. Since the code is embedded in each packet, RLNC renderspackets interchangeable and arrival order irrelevant. The destination

6 A. Kulkarni, M. Heindlmaier, D. Traskov,M. Medard, and M.-J. Montpetit; Net-work Coding with Association Poli-cies in Heterogeneous Networks.Proc. of the IFIP TC 6th int. conf. onNetworking; 110-118 (2011)

user needs only to assemble a sufficient number of packets, coded or

A codeon white paper 9

Page 10: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial

uncoded, in order to decode the flow. No path coordination is necessaryat the source. Such an advantage provides tremendous gains in cloudnetworks when moving large portions of data through Internet overlays.

Figure 5: RLNC supports multipathoperation without complex scheduling.RLNC’s native multipath support and its recoding feature form a powerful

combination. Together, they enable the minimization of coding overheadacross multiple paths without need for complex coordination. The exam-ple of Figure 5 shows a scenario where a 30-packet sector is transferred

USE CASE: Mesh Network

Recent experiments demonstrates the potential gains of RLNC’s recoding and multipath features compared toconventional end-to-end coding. In the used WiFi relay topology (shown above), the source transmits a 128-packetblock to the destination through two paths simultaneously. Only RLNC enables the relay to recode. The experimentshows that RLNC reduces overhead by 50% and requires less transmissions from the source to complete the transfer.

A codeon white paper 10

Page 11: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial

from the source to the destination node through three paths with distinctloss characteristics.

RLNC’s code embedding feature makes packets interchangeable andreplaceable. They can thus be injected through any path (and subjectedto its lossy links) without need to schedule or coordinate their arrivals atthe destination node. Owing to recoding, the overhead required alongeach path is minimized and determined by the losses of the worst-casehop rather than the cumulative losses along the path. Hence, RLNCenables each path to effectively contribute its full capacity to the flow. Inother words, RLNC enables the source node to sum up the contributionsof the three paths seamlessly. In this example, if 10 Mbps were injectedthrough each path, the destination would see a virtual pipe of 26 Mbps.

Code-Aware Protocols

RLNC enables critical transport protocol improvements that are particu-larly relevant in best-effort Internet overlays and wireless access links.Figure 6 illustrates how an RLNC sliding window scheme can be usedto reduce transmission interruptions in TCP.

Figure 6: RLNC greatly improves theefficiency of TCP by adapting to itssliding window.In order to preserve arrival order, once a packet is lost in TCP, the

receiver ignores subsequent successful packet transmissions, and re-sponds with duplicate acknowledgements (i.e., acknowledging the lastpacket that was received in order), until the missing packet is received. Ifthree duplicate acknowledgements are received at the sender, the trans-mission window is drastically reduced, as shown in the Figure 6 (left).While this behavior works well in congested networks where large blocksof successive packets are typically dropped, it has potentially devastatingeffects in networks with random packet losses.

A codeon white paper 11

Page 12: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial

RLNC enables network-coding enhanced TCP (TCP/NC) to overcomerandom losses. TCP/NC is based on coding the packets of the senderwindow prior to transmission7,8,9. Since coded packets are interchange-

7 J.K. Sundararajan, D. Shah, M.Medard, S. Jakubczak, M. Mitzen-macher, J. Barros; Network CodingMeets TCP: Theory and Implementa-tion. Proceedings of the IEEE 99 (3):490-512 (2011)8 M. Kim, M. Medard, and J. Bar-ros; Modeling network coded TCPthroughput: A simple model and itsvalidation. Proc. Valuetools: 131-140(2011)9 L. Urbina; Applying Network Codingto TCP. MIT M.Eng. Thesis (2012)

able, packets are inherently seen to arrive in order at the TCP/NCreceiver, as depicted in Figure 6 (right). Therefore, faced with an iden-tical loss pattern, TCP/NC does not ignore any successfully receivedpackets. By acknowledging new packets at each successful reception,TCP/NC further prevents the sender window from collapsing. Moreover,RLNC enables TCP/NC to dynamically increase its redundancy level bysending additional coded packets. Experimental results show that codedTCP improves network efficiency remarkably (see use case below).

RLNC relaxes TCP’s strict in-order arrival requirement and provides itwith new and powerful redundancy tools. Thanks to its versatility, RLNCis capable of adapting to TCP’s sliding window paradigm. Coded TCPis just one example of how RLNC adapts to digital protocols and sys-tems. RLNC exhibits similar tractability when handling Automatic RepeatreQuest (ARQ)10 or multi-resolution video storage11, for example.

10 J.K. Sundararajan, D. Shah, M.Medard; ARQ for network coding. ISIT2008

11 U.J. Ferner, T. Wang, M. Medard, andE. Soljanin. Resolution-aware networkcoded storage. arXiv:1305.6864 (2013)

USE CASE: Coded TCP (CTCP)

Coded TCP2, an experimental implementation of TCP/NC, enables unprecedented levels of QoE in video streaming.The plots below depict the playing time and buffer under-runs (i.e., interruptions) of a 60-second video streaming overa 25Mbps wireless link1. While QoE rapidly deteriorates under TCP even at low packet losses (several interruptionsand a 50%+ increase in playout time at 1% loss), coded TCP enables the video to play without interruption even atpacket loss levels reaching 20%.

Note that the number of interruptions in figure (b) reaches a maximum when there is one interruption for each videoblock. Nevertheless, figure (a) shows that completion time keeps growing, since the duration of each interruptioncontinues to increase. Moreover, the plot of figure (a) is logarithmic. Hence, the trend for standard TCP is in factexponential. For example, with only 5% loss, the 60-second playout time increases to 300 seconds without RLNC.

A codeon white paper 12

Page 13: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial 13

RLNC Storage: Enabling Seamless Distribution

RLNC FUNDAMENTALLY IMPROVES STORAGE TECHNOLOGY in twoways. First, RLNC’s network virtualization capability gives connecteddata centers and clouds superior transport capabilities, enabling serversto optimally tunnel data over multiple paths having heterogeneous pro-tocols, technologies, and performances. RLNC’s seamless tunnelingover unreliable best-effort links will greatly improve overlays betweenclouds, data centers, and server fields, thus improving the performanceof virtual storage and clouding systems. Second, as a storage virtu-alization ingredient, network coding will significantly enhance storageautomation algorithms through major qualitative and quantitative gainsin storage capacity, energy usage, data availability, and security. Thisenables storage interfaces to seamlessly distribute content, as depictedbelow.

Optimization of Storage Resources

RLNC can offer greater flexibility in adding and replacing storage nodesas compared to existing codes such as Reed Solomon codes. Fur-thermore, RLNC increases the availability of stored data. The simpleexample of Figure 711 shows the crucial advantage of coded storageover conventional replication schemes.

In the example of Figure 7, a file is divided into two sectors (L1 and L2)and is stored across four drives, or nodes. In conventional replicationschemes, a user needs access to both L1 and L2 storage nodes. Ifboth L1 (or L2) nodes are busy, the file request is delayed. In codedstorage, two of the nodes may host linear combinations of L1 and L2.Hence, requests are less likely to be blocked, as access to any twonodes is sufficient to decode the file. As a consequence, data availability

A codeon white paper

Page 14: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial

Figure 7: Coded Storage Principle.

improves whereas the required storage resources decrease (see usecase below). This optimization feature finds important applications indata caching, Storage Area Networks (SANs)12, and distributed clouds,

12 U.J. Ferner, M. Medard, and E. Sol-janin. Toward Sustainable Networking:Storage Area Networks with NetworkCoding. arXiv:1205.3797 (2012)as illustrated below.

USE CASE: Coding in SANs

RLNC can be used to reduce blocking due to saturation in storage area networks (SANs)12. The example aboveillustrates the use of RLNC to either increase availability with existing storage assets or to reduce the number ofassets required. In this example, a coded file sector may replace a number of uncoded sectors, thus reducing storagerequirements without loss of performance. RLNC brings energy savings in data centers that are estimated to 20-50%.The more redundant coded sectors are implemented, the higher the data availability.

A codeon white paper 14

Page 15: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial

Storage Versatility

RLNC adapts to new storage procedures in a similar way as it adapts totransport protocols. A prime example is multi-resolution video storage,where RLNC presents important advantages. Figure 8 depicts thestorage of two-layer video content across a large number of servers ordrives11.

Figure 8: Coded Resolution-awareStorage.

Three possible schemes are shown. In conventional schemes (Classic),low- (L1) and high-resolution (L1, L2) copies are provided by separategroups of nodes. In Uncoded Resolution-aware Storage (URS), the base(L1) and refinement (L2) layers are stored separately. This introducesadditional flexibility in the provisioning of storage. Finally, in CodedResolution-aware Storage (CRS), the second group of nodes storeslinear combinations of the layers. Unlike both uncoded schemes, in thecoded scheme, type-2 requests need not obtain the base layer from theheavily loaded L1 nodes, thus significantly reducing server saturation.

USE CASE: Multi-resolution Video Storage

Recent research results illustrate the significant reduc-tion in saturation probability obtained through CodedResolution-aware Storage (CRS)11. As the proportionof stored high-definition videos globally increases, RLNCprovides a viable solution for continued provisioning of ahigh Quality of Experience (QoE).

A codeon white paper 15

Page 16: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial

New Distribution Models

RLNC enables new content distribution models. For example, RLNCoffers the opportunity to offload Content Distribution Networks (CDNs)through coded distributed storage13. As illustrated in Figure 9, the 13 W. Zeng, F.P. Calmon and M. Medard.

When P2P meets the CDN: a networkcoding approach to integratingthe two. Information Theory andApplications Workshop (ITA) 2013

caching of a small proportion of the coded sectors at edge nodes has anumber of beneficial consequences. As in conventional uncoded caches,it enables edge users to speed up their downloads. Unlike conventionalcaching solutions, coded caching requires less storage resources andsimplifies download transactions as any coded sector can replace anymissing file sector.

Figure 9: Coded distributed storageoffloads servers and speeds downloads.Most importantly, when the locally cached sectors are not sufficient to

replace missing sectors, users can use other coded caches rather thanreturn to the server. Therefore, RLNC uniquely allows applications tocombine the contents of different caches without prior coordination ofcache content. The availability of coded sectors at edge caches henceoffloads servers more efficiently. Moreover, coded caching is backwardcompatible, as users are able to compute missing sectors from bothcoded and un-encoded caches.

Novel Content Protection Paradigms

RLNC enables new forms of content protection where parts of a file actas a cipher for the rest14. Figure 10 illustrates a simple example of an

14 P. Oliveira, L. Lima, T.T. Vinhoza,J. Barros, and M. Medard. TrustedStorage over Untrusted Networks.IEEE Globecom 2010 - CommunicationTheory Symposium.

RLNC scheme where file sectors are coded and spread over a numberof locations such that the original data cannot be reconstructed without

A codeon white paper 16

Page 17: Code on White Paper RLNC a Tutorial

RANDOM LINEAR NETWORK CODING: A Tutorial

access to a minimum number of locations. In the example of Figure 10,an eavesdropper with access to less than three networks is unable todecode any symbol from the original file. RLNC can hence be used toprovide additional security on top of existing encryption schemes forcritical data. Alternatively, RLNC can provide a flexible means of tradingoff complexity against level of security. Such increased robustness toeavesdropping may thus become an effective tool for content protectionand digital rights management (DRM) enforcement.

Figure 10: RLNC enables new forms ofdistributed content protection.

A codeon white paper 17