Cooperative Video Streaming on Smartphones Hülya Seferoğlu † , Lorenzo Keller ‡ , Blerim Cici † , Anh Le † , Athina Markopoulou † , Christina Fragouli ‡ † University of California, Irvine ‡ École Polytechnique Fédérale de Lausanne Supported by AFOSR MURI, NSF CAREER and by ArmaSuisse W+T
28
Embed
Cooperative Video Streaming on Smartphones - Newsodysseas.calit2.uci.edu/wiki/lib/exe/fetch.php/public:slides... · Cooperative Video Streaming on Smartphones Scenario 3 The Internet
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Cooperative Video Streaming on Smartphones
Hülya Seferoğlu†, Lorenzo Keller‡, Blerim Cici †, Anh Le †,
Athina Markopoulou †, Christina Fragouli‡
†University of California, Irvine ‡ École Polytechnique Fédérale de Lausanne
Supported by AFOSR MURI, NSF CAREER and by ArmaSuisse W+T
“Unofficial” Motivation
• Typical practical questions after a talk on network coding: – “Is it implemented in practice?” – “How much benefit does it bring?” – “How much is the overhead”? – “Can non-network coding approaches do as well?” – “I don’t believe this is useful!”
• We decided to implement network coding …
2
Cooperative Video Streaming on Smartphones Scenario
3
The Internet Video Source
Smartphones
Youtube, Netflix,
etc.
Video Proxies
Base Stations
о Several users, within proximity of each other
о Interested in viewing the same video at the same time (e.g. a soccer match or lecture)
о Have Internet connection via cellular or wifi
о Mobile-to-mobile connections possible via bluetooth or wifi.
4
The Internet Video Source
Smartphones
Cooperative Video Streaming on Smartphones Examples
о Each individual user may not have high enough rate to stream a high quality video (due to bad, time-varying, or no cellular connection)
о Special case: sharing a video stored on one of the phones Base
Stations
5
The Internet Video Source
Smartphones
Cooperative Video Streaming on Smartphones Question
о How to best utilize all resources to provide the best performance?
Base Stations
6
1. Cooperation: use cellular links and local links 2. Network coding: intra-session, application-layer 3. Broadcast: use wireless+NC efficiently 4. Implementation on Androids This scenario lends itself naturally to network coding.
The Internet Video Source
Smartphones
Cooperative Video Streaming on Smartphones Key Ingredients
Base Stations
Related Work
7
о Smartphones with NC Implementation о P. Vingelmann, M. V. Pedersen, F. H. P. Fitzek, and J. Heide, “On-the-fly packet error recovery in a
cooperative cluster of mobile devices,” in Proc. of Globecom, Houston, TX, Dec. 2011. (Univ. of Aalborg) о Baochun Li’s group: NC implementation in Iphones and Ipad.
о Wifi devices with NC Implementation о COPE testbed, … о Y. Park, C. Jo, S. Yun, H. Kim, “Multi-room IPTV delivery through pseudo-broadcast over IEEE 802.11 links,”
in Proc. of VTC, Taipei, Taiwan, May 2010. о S. Sen, N. K. Madabhushi, S. Banerjee, “Scalable wifi media delivery through adaptive broadcasts,” in Proc.
of NSDI, San Jose, CA, April 2010.
о Network Coding-based P2P о C. Gkantsidis, P. R. Rodriguez, “Network coding for large scale content distribution,” in Proc. of Infocom,
Miami, FL, March 2005. о M. Wang, B. Li, “R2: random push with random network coding in live peer-to-peer streaming,” in IEEE
JSAC, vol. 25(9), pp. 1655–1666, Dec. 2007. о Z. Liu, C. Wu, B. Li, S. Zhao, “UUSee: large-scale operational on demand streaming with random network
coding,” in Proc. of Infocom, San Diego, CA, March 2010. о B. Li, D. Niu, “Random network coding in peer-to-peer networks: from theory to practice,” in Proceedings of
the IEEE, vol. 99(3), pp. 513-523, March 2011.
Related Work
8
о Network Coding & NUM о D. S. Lun, N. Ratnakar, M. Medard, R. Koetter, D. R. Karger, T. Ho, E. Ahmed, and F. Zhao, “Minimum-cost
multicast over coded packet networks,” in IEEE Trans. on Information Theory, vol. 52(6), June 2006. о L. Chen, T. Ho, S. Low, M. Chiang, and J. C. Doyle, “Optimization based rate control for multicast with
network coding,” in Proc. of Infocom, Anchorage, AK, May 2007. о J. Yuan, Z. Li, W. Yu, and B. Li, “A cross-layer optimization framework for multi-hop multicast in wireless
mesh networks,” in IEEE JSAC, vol. 24(11), Nov. 2006. о Z. Li, B. Li, and M. Wang, “Optimization models for streaming in multihop wireless networks,” in Proc. of
ICCCN, Honolulu, HI, Aug. 2007.
о Network Coding & NUM & P2P о M. Chen, M. Ponec, S. Sengupta, J. Li, P. A. Chou, “Utility maximization in peer-to-peer systems,” in Proc. of
ACM Sigmetrics, Annapolis, MD, June 2008. о S. Liu, R. Z.-Shen, W. Jiang, J. Rexford, M. Chiang, “Performance bounds for peer-assisted live streaming,”
in Proc. of ACM Sigmetrics, Annapolis, MD, June 2008. о Z. Shao and S.-Y. R. Li, “To code or not to code: rate optimality of network coding versus routing in peer-to-
peer networks,” in IEEE Trans. on Communications, vol. 59(4), pp. 948-954, April 2011. о C. Liang, M. Zhao, and Y. Liu, “Optimal bandwidth sharing in multiswarm multiparty p2p video-conferencing
systems,” in IEEE/ACM Trans. on Networking, March 2011. о S. Hua, Y. Guo, Y. Liu, H. Liu, and S. S. Panwar, “Scalable video multicast in hybrid 3g/ad-hoc networks,” in
IEEE Trans. on Multimedia, vol. 13(2), pp. 402-413, April 2011. о M. Ponec, S. Sengupta, M. Chen, J. Li, P. A. Chou, “Multi-rate peerto-peer video conferencing: a distributed
approach using scalable coding,” in Proc. of ICME, New York, NY, July 2009. о D.-C. Tomozei and L. Massoulie, “Flow Control for Cost-Efficient Peer-to-Peer Streaming,” in Proc. of
Infocom, San Diego, CA, March 2010.
9
1. Cooperation: use cellular links and local links 2. Network coding: intra-session, application-layer 3. Broadcast: use wireless+NC efficiently 4. Implementation on Androids
The Internet Video Source
Smartphones
MicroCast Key ingredients - revisited
Outline
• NUM formulation
• Implementation and demo on androids
• Work in progress..
10
NUM Formulation Cooperation & Unicast
11
Smartphones
The Source
∑ ∑
∑
∈ −∈
∈
≤
−∈∈∀−≤
∈∈∀−≤
−∈∈∀≥−
∈∀≥−
Ni iNjji
jijijiji
iiji
jiji
Niji
x
iNjNipCgNjNipCxiNjNixg
Njxxts
xU
}{,
,,,,
,
,,
,
}{,,)1(
,),1(
}{,,0
,0..
)(max
γτ
τ
Optimize video rate: x
Flow conservation constraints
Capacity constraints
Interference
Downlink 3g/4g Ci
pi
x
Ci,j, pi,j
xi,j
i gi,j
NUM Formulation Cooperation & Broadcast
12
∑∑
∏
∑
∑
∈ ∈
∈∈
∈
∈
≤
∈∈∀−≤
−∈∈∀≤
∈∈∀−≤
−∈∈∀≥−
∈∀≥−
Ni HJJi
JiJj
jijiJjJi
JjJJiji
iiji
jiji
Niji
x
HJNipCf
iNjNifg
NjNipCxiNjNixg
Njxxts
xU
γτ
τ
,
,,,,
|,,
,
,,
,
,,)1(}{min
}{,,
,),1(
}{,,0
,0..
)(max Optimize video rate: x
Flow conservation constraints
Downlink and local area capacity
constraints
Interference
Smartphones
The Source
Downlink 3g/4g Ci
pi
x
Ci,j, pi,j
xi,j
i gi,j
NUM Formulation Cooperation & Broadcast & NC
13
Smartphones
The Source
∑∑
∑
∑
∈ ∈
∈
∈
∈
≤
∈∈∀−≤
−∈∈∀≤
∈∈∀−≤
−∈∈∀≥−
∈∀≥−
Ni HJJi
JijijiJjJi
JjJJiji
iiji
jiji
Niji
x
HJNipCf
iNjNifg
NjNipCxiNjNixg
Njxxts
xU
γτ
τ
,
,,,,
|,,
,
,,
,
,,)}1({min
}{,,
,),1(
}{,,0
,0..
)(max Optimize video rate: x
Flow conservation constraints
Downlink and local area capacity
constraints
Interference
Downlink 3g/4g Ci
pi
x
Ci,j, pi,j
xi,j
i gi,j
NUM Solution
14
)()'( 1 ∑∈
−=Jj
jUx λRate Control at the Source
NjNipCxts
x
iiji
Ni Njjijjix
∈∈∀−≤
−∑∑∈ ∈
,),1(..
)(max
,
,, ηλDownlink Rate Control
γτ
ηττ
≤
−
∑∑
∑∑ ∑
∈ ∈
∈ ∈ ∈∈
Ni HJJi
Ni HJ JjjijiJjjiJi
ts
pC
,
,,,,
..
))}1({min(max
Local Area Rate Control/Scheduling
Queue Update at the Source
Queue Update at Smartphones
Njtxtx
tt
Nijit
jj
∈∀−
+=++
∈∑ ,]})()([
)({)1(
,β
λλ
NjNitgtx
tt
jijit
jiji
∈∈∀−
+=++ ,,)]}()([
)({)1(
,,
,,
β
ηη
Cooperation & Broadcast & NC
γτ
ηττ
≤
−
∑∑
∑∑ ∑ ∏
∈ ∈
∈ ∈ ∈ ∈∈
Ni HJJi
Ni HJ Jj JjjijiJjjiJi
ts
pC
,
,,,,
..
)})1(}{min(maxCooperation & Broadcast & No-NC
γτ
τητ
≤
−
∑∑
∑∑
∈ ∈
∈ ∈
Ni Njji
Ni Njjijijiji
ts
pC
,
,,,,
..
)1(maxCooperation & Unicast & NC/No-NC
Performance Evaluation Numerical Results: throughput vs # of users
о How to determine source video rate? о Optimal downlink rates? о Optimal mobile-to-mobile rates о Which mobile should transmit? о What information needs to be exchanged?
о Implementation should mimic the optimal solution
о Can use the numerical results to check real experiments, understand the effect of various parameters, and for provisioning
16
From NUM to implementation
Implementation Hardware
о Hardware platform о Google Nexus S
о 1 GHz Cortex A8, 512 MB RAM
о Network connections о cellular (3G) о 802.11b о Bluetooth 2.1+EDR
17
о Software platform о Android 2.3 о Application written in Java runs on
о Android (mobile phones, tablets) о Java 2 SE (laptops, etc.)
18
Implementation Software
Application Architecture
19
GUI and Video player
Segment reordering and caching
Download segments from source
Downlink: Wifi/3G
Local link: Bluetooth/WiFi
Local CollaboraFon
Network layer
AbstracFon layer
Requester
Collaborative SegmentRequester
HTTP Segment Producer
Segment Producer
Segment Consumer
SegmentConsumer
StoredStreamImpl
NCPeer
StoredStream StorageEventListener
NetworkLayer
Channel
NetworkLayerImpl
MessageListener
MessageListener
Bluetooth Endpoint Manager
UDP Endpoint Manager
Bluetooth Connecti
on
BluetoothLinkLayer
Connection Endpoint Manager
Datagram Endpoint Manager
Multicast Endpoint Manager
Broadcast Endpoint Manager
Bluetooth Peer
Directory
Link Layer
Link Layer
Listener Connection
Link Layer
Directory Entry
Listener
PeerDirectory
Neighbor Listener
NC Peer
Factory
Collaborative SegmentRequester
Factory
StreamStorage
Impl
HTTP Stream Publisher
StoredStream StreamStorage
StreamControllerImpl
Stream Storage
Segment Distributor
Factory
Segment Producer Factory
SegmentRequester Segment Requester
Factory
StreamPublisher
Multiplexer
NetworkLayer
Channel
MessageListener
MessageListener
Multiplexer
NeighborListener
GUI
StreamController
TCP/IP
Andorid Media Player HTTP
3G
Bluetooth stack (RFCOMM)
Coding: not a challenge
l We used NCUtils l Java ( and C ) library available at: http://arni.epfl.ch/software/ l Multiplication and inverse done with table lookup, addition done with XOR
l Encoding/Decoding: l RNC encoding, early decoding l could support rates >6Mbps
l Parameters (not optimized) l Symbol: 1B (efficient to implement) l Generation size 10. ~ 10KB RAM to decode each generation l Payload size 1000 bytes l Coding coefficient overhead 1%
21
Multiple Interfaces: a challenge
• Android is optimized for space and battery – 3G, WiFi, Bluetooth
• Simultaneously using multiple interfaces: – Bluetooth and 3G: ok – Bluetooth and wifi: on the same chip – 3G and WiFi: one sleeps while the other is active – (use WiFi for both downlink and local links: MAC contention) – We had to re-implement a network layer to provide routing and
datagram communication at the application layer
22
Broadcast: a major challenge
о WiFi Broadcast: not the best
option (base rate, reliability) о WiFi Pseudo-broadcast on
androids (vs. PCs) is challenging: – Have to root the phone – Driver for overhearing not
available on all devices – Does not work in ad-hoc mode – Sniffer: we had to extend the
Android API to support overhearing
23
A B
C
о Bluetooth: currently not supported о WiFi: doable but difficult