BemTV: Modelo Híbrido para Transmissão de Vídeos ao Vivo utilizando Peer-to-Peer

Post on 26-Jun-2015

641 views 0 download

description

http://bem.tv

Transcript of BemTV: Modelo Híbrido para Transmissão de Vídeos ao Vivo utilizando Peer-to-Peer

Modelo  Híbrido  para  Transmissão  de  Vídeosao  Vivo  utilizando  Peer-­‐to-­‐Peer

http://bem.tv

Wednesday, May 7, 14

‣ Flávio Ribeiro‣ Engenheiro de Software (Globo.com - Webmedia)‣ Aluno de Mestrado/Pesquisador (TeleMídia Labs)‣ @flavioribeiro‣ http://flavioribeiro.com

Wednesday, May 7, 14

Agenda

‣ Motivação‣ Background‣ Pesquisa‣ O que já foi feito?‣ Conclusão e Trabalhos Futuros‣ Referências

Wednesday, May 7, 14

Motivação

Wednesday, May 7, 14

‣ Crescimento da audiência na Internet & preferência dos usuários por consumo de conteúdo de vídeo

Motivação

Wednesday, May 7, 14

‣ Crescimento da audiência na Internet & preferência dos usuários por consumo de conteúdo de vídeo

Motivação

‣ Red Bull Stratos 2012

‣ 8 milhões usuários simultâneos

Wednesday, May 7, 14

Motivação

‣ Red Bull Stratos 2012

‣ 8 milhões usuários simultâneos

‣ FIFA Copa das Confederações 2013 para Brasileiros

‣ Quase meio milhão de usuários simultâneos

‣ Crescimento da audiência na Internet & preferência dos usuários por consumo de conteúdo de vídeo

Wednesday, May 7, 14

Motivação‣ Qualidade dos Vídeos disponibilizados na internet cresce

exponencialmente

Wednesday, May 7, 14

Wednesday, May 7, 14

Motivação‣ Qualidade dos Vídeos disponibilizados na internet cresce

exponencialmente

700#1200#

3500#

0#

1000#

2000#

3000#

4000#

2006#FIFA#World#Cup## 2010#FIFA#World#Cup## 2014#FIFA#World#Cup#

Maximum'Delivered'Bitrate'

Bitrate#in#Kbps#

Wednesday, May 7, 14

‣ Content Delivery Networks

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

‣ Escalabilidade: CDNs escalam com a adição de pontos de presença (PoP’s)

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

‣ Escalabilidade: CDNs escalam com a adição de pontos de presença (PoP’s)

‣ Custo: O YouTube gasta 1 milhão de dólares por dia!

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

‣ Escalabilidade: CDNs escalam com a adição de pontos de presença (PoP’s)

‣ Custo: O YouTube gasta 1 milhão de dólares por dia!

‣ Qualidade da Experiência (QoE)

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

‣ Escalabilidade: CDNs escalam com a adição de pontos de presença (PoP’s)

‣ Custo: O YouTube gasta 1 milhão de dólares por dia!

‣ Qualidade da Experiência (QoE)

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

‣ Escalabilidade: CDNs escalam com a adição de pontos de presença (PoP’s)

‣ Custo: O YouTube gasta 1 milhão de dólares por dia!

‣ Qualidade da Experiência (QoE)

Motivação

Wednesday, May 7, 14

Rebuffers by Region and Telecom Carrier at Brazil. Globo.com, 2013.

Motivação

Wednesday, May 7, 14

‣ Content Delivery Networks

‣ Escalabilidade: CDNs escalam com a adição de pontos de presença (PoP’s)

‣ Custo: O YouTube gasta 1 milhão de dólares por dia!

‣ Qualidade da Experiência (QoE)

Motivação

‣ “4 out of 5 users abandon a video if it rebuffers during playback.” TubeMogul (December, 2009)

Wednesday, May 7, 14

Video Stream Quality Impacts Viewer Behavior : Inferring Causality Using Quasi-Experimental Designs, KRISHNAN S. Shunmuga. A. IEEE/ACM Transactions on Networking. 2013.

Motivação‣ Startup Time x Abandonment Rate

Wednesday, May 7, 14

Background

Wednesday, May 7, 14

‣ Protocolos de Streaming Multimídia‣ RTMP x HTTP

Background

Wednesday, May 7, 14

‣ Protocolos de Streaming Multimídia‣ RTMP x HTTP

HTTP versus RTMP: Which way to Go and Why?, Cisco Whitepaper (October, 2011)

Background

RTP/RTSP/RTMP HTTP-Based

Mostly on top of UDP On top of HTTP

Specialized Media Servers Segmenter + Ordinary Web Servers

Low Delay High Delay

Wednesday, May 7, 14

‣ Protocolos de Streaming Multimídia‣ RTMP x HTTP

Tempo Assistido mais usuáriosna melhorqualidade

Qualidade Média

Quality of Experience Report. Globo.com, 2013.

Background

Wednesday, May 7, 14

‣ Protocolos de Streaming Multimídia‣ Protocolo baseado em HTTP

Background

Wednesday, May 7, 14

‣ Protocolos de Streaming Multimídia‣ Protocolo baseado em HTTP

Background

Wednesday, May 7, 14

‣ Protocolos de Streaming Multimídia‣ Protocolo baseado em HTTP

video está segmentado!

Background

Wednesday, May 7, 14

‣ Protocolos de Streaming Multimídia‣ Protocolo baseado em HTTP

Background

Wednesday, May 7, 14

‣ Protocolos de Streaming Multimídia‣ Protocolo baseado em HTTP

‣ HTTP Caching r

Background

Wednesday, May 7, 14

‣ Protocolos de Streaming Multimídia‣ Protocolo baseado em HTTP

‣ HTTP Caching r

‣ Transparent Proxies r

Background

$ curl -I "http://hls.glbvid.com/new/tvg/tvg_264/tvg_1372204662819_1372204662819_1219.ts" HTTP/1.1 200 OKServer: nginxDate:Wed, 26 Jun 2013 01:19:34 GMTContent-Type: video/mp2tContent-Length: 172584Connection: keep-aliveLast-Modified:Wed, 26 Jun 2013 01:19:04 GMT Expires:Wed, 26 Jun 2013 01:24:14 GMT Cache-Control: public

Wednesday, May 7, 14

‣ Protocolos de Streaming Multimídia‣ Protocolo baseado em HTTP

‣ HTTP Caching r

‣ Transparent Proxies r

‣ Delay Introduction s

Background

Wednesday, May 7, 14

‣ Protocolos de Streaming Multimídia‣ Protocolo baseado em HTTP

‣ HTTP Dynamic Streaming (HDS) by Adobe

‣ HTTP Live Streaming (HLS) by Apple (IETF Draft)

‣ Smooth Streaming by Microsoft

‣ DASH by MPEG

Background

Wednesday, May 7, 14

‣ Protocolos de Streaming Multimídia‣ Protocolo baseado em HTTP

‣ HTTP Dynamic Streaming (HDS) by Adobe

‣ HTTP Live Streaming (HLS) by Apple (IETF Draft)

‣ Smooth Streaming by Microsoft

‣ DASH by MPEG

Background

Wednesday, May 7, 14

‣ Peer-to-Peer‣ Conceito de Arquitetura de Sistemas Distribuídos

Background

Wednesday, May 7, 14

‣ Peer-to-Peer‣ Conceito de Arquitetura de Sistemas Distribuídos

Background

Wednesday, May 7, 14

‣ Peer-to-Peer‣ Conceito de Arquitetura de Sistemas Distribuídos

Background

Wednesday, May 7, 14

‣ Peer-to-Peer‣ Conceito de Arquitetura de Sistemas Distribuídos

Background

Wednesday, May 7, 14

‣ Peer-to-Peer‣ Conceito de Arquitetura de Sistemas Distribuídos

Background

Wednesday, May 7, 14

‣ Peer-to-Peer‣ Conceito de Arquitetura de Sistemas Distribuídos

Background

Wednesday, May 7, 14

Background

‣ Peer-to-Peer‣ Conceito de Arquitetura de Sistemas Distribuídos‣ P2P Puro

Wednesday, May 7, 14

Background

‣ Peer-to-Peer‣ Conceito de Arquitetura de Sistemas Distribuídos‣ P2P Híbrido

Wednesday, May 7, 14

‣ Peer-to-Peer‣ PPLive, PPStream, CoolStreaming, ZIGZAG,

PRIME, AnySee, HotStreaming, SplitStream, Chunkspread, DirectedPush, TURIN, Octoshape

Background

Wednesday, May 7, 14

‣ Peer-to-Peer‣ PPLive, PPStream, CoolStreaming, ZIGZAG,

PRIME, AnySee, HotStreaming, SplitStream, Chunkspread, DirectedPush, TURIN, Octoshape

Background

Wednesday, May 7, 14

‣ WebRTC

Background

Wednesday, May 7, 14

‣ WebRTC

Background

Wednesday, May 7, 14

‣ WebRTC

Background

Wednesday, May 7, 14

‣ WebRTC‣ PeerConnection API‣ MediaStream API‣ DataChannel API

Background

Wednesday, May 7, 14

‣ WebRTC

Background

Wednesday, May 7, 14

‣ WebRTC

Background

Wednesday, May 7, 14

Pesquisa

Wednesday, May 7, 14

“In p2p systems, the higher quantity of active peers, the better delivery service works.

DUYEN HOA HA, A novel Hybrid CDN-P2P mechanism for Effective real-time media streaming

Pesquisa

Wednesday, May 7, 14

“Data delivery is better in broadcast based systems (...),but as the user volume for dynamic content increases,internet scale search and data delivery using peer-to-peersystems beats any broadcast based system.

KAVYA LAKSHMI SUDHEERA, Dynamic P2P Streaming Using Delaunay Edges

Pesquisa

Wednesday, May 7, 14

“Peer-assisted data sharing can reduce the network costby dramatically decreasing download bandwidth of content servers up to 96%.

SEONGHO CHO, Playback Latency Reduction for Internet Live Video Services in CDN-P2P Hybrid Architecture

Pesquisa

Wednesday, May 7, 14

‣ Propor Arquitetura P2P/CDN Híbrida para Distribuição de Vídeo ao Vivo utilizando WebRTC‣ Evita a necessidade da instalação de plugins de terceiros

‣ Usa os poderes do peer-to-peer para escoar os chunks de vídeo entre os nós (usuários)

‣ Diminui o custo da transmissão

Pesquisa

Wednesday, May 7, 14

A Hybrid Peer-to-Peer/CDN Model for Live Video Distribution

Wednesday, May 7, 14

O que já foi feito?

Wednesday, May 7, 14

‣ Troca de chunks de vídeo entre peers utilizando HTTP Live Streaming (HLS) e WebRTC

O que já foi feito?

Wednesday, May 7, 14

http://bem.tv/demo.html

‣ Troca de chunks de vídeo entre peers utilizando HTTP Live Streaming (HLS) e WebRTC

O que já foi feito?

Wednesday, May 7, 14

‣ Troca de chunks de vídeo entre peers utilizando HTTP Live Streaming (HLS) e WebRTC

O que já foi feito?

Wednesday, May 7, 14

205/44 246/49

157/115

‣ Troca de chunks de vídeo entre peers utilizando HTTP Live Streaming (HLS) e WebRTC

O que já foi feito?

Wednesday, May 7, 14

‣ Troca de chunks de vídeo entre peers utilizando HTTP Live Streaming (HLS) e WebRTC

‣ Conceito de “enxame” & matching de nós (usuários)

‣ Geolocalização + Provedor de Internet

http://server.bem.tv/room

O que já foi feito?

Wednesday, May 7, 14

‣ Troca de chunks de vídeo entre peers utilizando HTTP Live Streaming (HLS) e WebRTC

‣ Conceito de “enxame” & matching de nós (usuários)

‣ Geolocalização + Provedor de Internet

O que já foi feito?

Wednesday, May 7, 14

‣ Troca de chunks de vídeo entre peers utilizando HTTP Live Streaming (HLS) e WebRTC

‣ Conceito de “enxame” & matching de nós (usuários)

‣ Geolocalização + Provedor de Internet

O que já foi feito?

Wednesday, May 7, 14

‣ Troca de chunks de vídeo entre peers utilizando HTTP Live Streaming (HLS) e WebRTC

‣ Conceito de “enxame” & matching de nós (usuários)

‣ Geolocalização + Provedor de Internet

‣ Protocolo minimalista de sinalização e troca de chunks

O que já foi feito?

Wednesday, May 7, 14

‣ Protocolo minimalista de sinalização e troca de chunks

A

B

C

O que já foi feito?

Wednesday, May 7, 14

A

B

CA needs chunk bbb_3.ts

‣ Protocolo minimalista de sinalização e troca de chunks

O que já foi feito?

Wednesday, May 7, 14

A

B

C

<A> DESIRE:bbb_3.ts

‣ Protocolo minimalista de sinalização e troca de chunks

O que já foi feito?

Wednesday, May 7, 14

A

B

C

checking if have bbb_3.ts

<A> DESIRE:bbb_3.ts

checking if have bbb_3.ts

‣ Protocolo minimalista de sinalização e troca de chunks

O que já foi feito?

Wednesday, May 7, 14

A

B

C

<A> DESIRE:bbb_3.ts

have bbb_3.ts!

have bbb_3.ts!

‣ Protocolo minimalista de sinalização e troca de chunks

O que já foi feito?

Wednesday, May 7, 14

A

B

C

<A> DESIRE:bbb_3.ts

<B-A> DESACK:bbb_3.ts

<C-A> DESACK:bbb_3.ts

‣ Protocolo minimalista de sinalização e troca de chunks

O que já foi feito?

Wednesday, May 7, 14

A

B

C

<A> DESIRE:bbb_3.ts

<B-A> DESACK:bbb_3.ts

<C-A> DESACK:bbb_3.ts

choosing the best peer

‣ Protocolo minimalista de sinalização e troca de chunks

O que já foi feito?

Wednesday, May 7, 14

A

B

C

<A> DESIRE:bbb_3.ts

<B-A> DESACK:bbb_3.ts

<C-A> DESACK:bbb_3.ts

C is the best!

‣ Protocolo minimalista de sinalização e troca de chunks

O que já foi feito?

Wednesday, May 7, 14

A

B

C

<A> DESIRE:bbb_3.ts

<B-A> DESACK:bbb_3.ts

<C-A> DESACK:bbb_3.ts

<A-C> REQ:bbb_3.ts

‣ Protocolo minimalista de sinalização e troca de chunks

O que já foi feito?

Wednesday, May 7, 14

A

B

C

<A> DESIRE:bbb_3.ts

<B-A> DESACK:bbb_3.ts

<C-A> DESACK:bbb_3.ts

<A-C> REQ:bbb_3.ts

<C-A> OFFER:bbb_3.ts:<blob>

‣ Protocolo minimalista de sinalização e troca de chunks

O que já foi feito?

Wednesday, May 7, 14

A

B

C

<A> DESIRE:bbb_3.ts

<B-A> DESACK:bbb_3.ts

<C-A> DESACK:bbb_3.ts

<A-C> REQ:bbb_3.ts

<C-A> OFFER:bbb_3.ts:<blob>

A have chunk bbb_3.ts!

‣ Protocolo minimalista de sinalização e troca de chunks

O que já foi feito?

Wednesday, May 7, 14

A

B

C

<A> DESIRE:bbb_3.ts

<B-A> DESACK:bbb_3.ts

<C-A> DESACK:bbb_3.ts

<A-C> REQ:bbb_3.ts

<C-A> OFFER:bbb_3.ts:<blob>

timeout? go to CDN

CDN

‣ Protocolo minimalista de sinalização e troca de chunks

O que já foi feito?

Wednesday, May 7, 14

O que já foi feito?

Wednesday, May 7, 14

‣ Primeiros Experimentos

‣ 10 Apple MacBooks White (2GB SDRAM)

‣ Mozila Firefox 27.1 (WebRTC compatible)

‣ Mesmo roteador Wi-Fi (10/100Mbps)

‣ Video

‣ Chunks com 5 segundos de duração

‣ 600 Kbps de bitrate (qualidade)

‣ CDN + Room Discoverer + P2P Signaling Server

‣ 1 server with 512MB of SDRAM em NY

O que já foi feito?

Wednesday, May 7, 14

‣ Primeiros Experimentos

O que já foi feito?

Wednesday, May 7, 14

‣ Resultado

O que já foi feito?

0"

20"

40"

60"

80"

100"

120"

140"

1" 3" 5" 7" 9" 11" 13" 15" 17" 19" 21" 23" 25" 27" 29" 31" 33" 35" 37" 39" 41" 43" 45" 47" 49" 51" 53" 55" 57" 59"

Requ

ests'

Minute'

CDN.only'x'CDN.P2P'Requests'per'minute'

CDN/only" CDN/P2P"

Wednesday, May 7, 14

‣ Resultado

‣ CDN-only: 7457 requests para a CDN

‣ CDN-P2P: 4482 requests para a CDN

O que já foi feito?

Wednesday, May 7, 14

‣ Resultado

‣ CDN-only: 7457 requests para a CDN

‣ CDN-P2P: 4482 requests para a CDN

‣ Redução de 39.98%

O que já foi feito?

Wednesday, May 7, 14

Conclusão e Trabalhos Futuros

Wednesday, May 7, 14

‣ Nossa abordagem é promissora!

Conclusão e Trabalhos Futuros

Wednesday, May 7, 14

‣ Nossa abordagem é promissora!

‣ Melhorias:

‣ Convergência de Peers e Over Swarming

‣ Reputation, Partnership, Leader Election

‣ Protocolo de troca de chunks de vídeo

‣ Segurança do Conteúdo

‣ Poisoned Chunks

‣ DoS Starvation

Conclusão e Trabalhos Futuros

Wednesday, May 7, 14

‣ Dynamic Clustering in Delaunay-Based P2P Networked Virtual Environments. Matteo Varvello. http://www.eurecom.fr/fr/publication/2682/download/rs-publi-2682.pdf

‣ GoDel: Delaunay Overlays in P2P Networks via Gossip. Ranieri Baraglia. http://hpc.isti.cnr.it/~dazzi/pdf/Baraglia12P2Pgodel.pdf

References

Wednesday, May 7, 14

‣ Dynamic P2P Streaming Using Delaunay Edges. Kavya Lakshmi Sudheera. http://www.ijera.com/papers/Vol3_issue6/FF36968971.pdf

‣ Optimized P2P Streaming Services with Delaunay Triangulation protocol. T. Hemanth. http://rspublication.com/ijeted/jan13/1.pdf

‣ TreeP: A Tree Based P2P Network Architecture. Benoit Hudzia. http://arxiv.org/pdf/cs/0608118.pdf

‣ Mesh or Multiple-Tree: A Comparative Study of Live P2P Streaming Approaches. Nazanin Magharei. http://mirage.cs.uoregon.edu/pub/infocom07-treemesh.pdf

‣ How Netflix Architects for Survival. Jeremy Edberg. http://www.infoq.com/presentations/netflix-architecture-resilience

References

Wednesday, May 7, 14

‣ http://gigaom.com/2009/12/10/4-out-of-5-viewers-leave-if-a-stream-buffers-once/

‣ https://people.cs.umass.edu/~ramesh/Site/HOME_files/imc208-krishnan.pdf

‣ http://www.ccs.neu.edu/home/cbw/4700/papers/p225.pdf

‣ http://www.bth.se/fou/cuppsats.nsf/all/16d53c7e6e725222c1257b01003764f3/$file/BTH2012Guniganti.pdf

‣ http://www.cisco.com/c/en/us/products/collateral/video/as5100-series-media-processor/white_paper_c11-675935.pdf

‣ http://tools.ietf.org/html/draft-ietf-ppsp-survey-06#page-6

References

Wednesday, May 7, 14

References•Berkvist, A., Burnett, D., Jennings, C. Narayanan, A. (2011) “WebRTC 1.0: Real-Time Communication Between Browsers”. Working Draft.•Bronzino, F. Gaeta, R. Grangetto, M. Pau, G. (2012) “An Adaptive Hybrid CDN/P2P Solution for Content Delivery Networks”. VCIP, page 1-6, IEEE.•Cho, S., Cho, J., Shin, S. (2010) “Playback Latency Reduction for Internet Live Video Services in CDN-P2P Hybrid Architecture”. 2013 IEEE International Conference on Communications.•Huang, C., Wang, A., Li, J., Ross, K. (2008) “Understanding hybrid CDN-P2P: why limelight needs its own Red Swoosh”. Proceedings of the 18th International Workshop on Network and Operating Systems Support for Digital Audio and Video.•Katz, T. (2012) “Mission Complete: Red Bull Stratos lands safely back on Earth”. http://goo.gl/bX31hl, accessed in March 2014.•Kovacevic, A., Graffi, K., Pussep, K., Steinmetz, R. (2009) “Underlay awareness in P2P systems: Techniques and challenges”. IEEE Symposium on Parallel & Distributed Processing.•Kutten, S., Panduragan, G., Peleg, D., Robinson, P., Trehan, A. (2013) “On the complexity of universal leader election”. Proceedings of the ACM symposium on Principles of distributed computing.•Li, B., Xie, S., Qu, Y., Keung, G.Y. (2008) “Inside the New CoolStreaming: Principles, Measurements and Performance Implications”. IEEE 27th Conference on Computer Communications.•Medina-López, C., Naranjo, J.A.M., García-Ortiz, J. P., Casado, L. G., González-Ruiz, V. (2013) “Execution of the P2PSP protocol in parallel environments”. XXIV Jornadas de Paralelismo. Madrid, Spain.•Naylor, A. (2013) “WebRTC is almost here, and it will change the web”. http://goo.gl/IgxF33, accessed in March 2014.•Nordyke, K, (2014) “HBO Go Crashes During ‘True Detective’ Finale”. http://goo.gl/zixUr7, accessed in March 2014.•Parmar, H. and Thornburg, M. (2012) “Adobe’s Real Time Messaging Protocol”. http://goo.gl/cGMWPI, accessed in March 2014.•Rosenberg. J, Mahy, R., Matthews, P. Wing, D. (2008) “Session Traversal Utilities for NAT (STUN)”. IEFT Proposed Standard.•Roussopolous, M., Baker, M., Rosenthal D. S. H., Giuli T. J., Maniatis, P., Mogul, P. (2004) “2 P2P or Not 2 P2P?”. Third International Workshop, IPTPS 2004.•Sandoval, G. (2013) “. Netflix Chief Product Officer: expect 4k Streaming within a year or two”. http://goo.gl/F4S133, accessed in March 2014.•Spangler, T. (2009) “YouTube May Lose $470 Million in 2009: Analysts”. http://goo.gl/oNgAzY, accessed in March 2014.•Xiong, L. and Liu, L. (2004) “PeerTrust: Supporting Reputation-Based Trust for Peer-to-Peer Electronic Communities”. IEEE Transactions on Knowledge and Data Engineering.•Yuste, L. and Melvin, H. (2012) “A Protocol Review for IPTV and WebTV Multimedia Delivery Systems”. Scientific Letters of the University of Zilina, vol 14.•Zimmerman, A., (2014) “ABC Promised to Livestream the Oscars and Totally Failed”. http://goo.gl/sTNb7d, accessed in March 2014.

Wednesday, May 7, 14