VoD BitTorrent Framework. Background BT is a very popular peer to peer protocol with many implementations: –http://en.wikipedia.org/wiki/Comparison_of_Bit.

Slides:



Advertisements
Similar presentations
Introduction to Web Design Lecture number:. Todays Aim: Introduction to Web-designing and how its done. Modelling websites in HTML.
Advertisements

Rarest First and Choke Algorithms Are Enough
Rarest First and Choke Algorithms are Enough Arnaud LEGOUT INRIA, Sophia Antipolis France G. Urvoy-Keller and P. Michiardi Institut Eurecom France.
The BitTorrent Protocol
The BitTorrent Protocol. What is BitTorrent?  Efficient content distribution system using file swarming. Does not perform all the functions of a typical.
Incentives Build Robustness in BitTorrent Author: Bram Cohen Presenter: Brian Liao.
The BitTorrent protocol A peer-to-peer file sharing protocol.
Incentives Build Robustness in BitTorrent Bram Cohen.
Bit Torrent (Nick Feamster) February 25, BitTorrent Steps for publishing – Peer creates.torrent file and uploads to a web server: contains metadata.
End-to-end Publishing Using Bittorrent. Bittorrent Bittorrent is a widely used peer-to- peer network used to distribute files, especially large ones It.
Conducted by:Cheng Wen Chi Chiu Kwok Shing Choi Kwok Yam Advised by Prof. Danny Tsang TD1a-09, BEng of Computer Engineering, HKUST.
1 Communication Networks Kolja Eger, Prof. Dr. U. Killat 1 From Packet-level to Flow-level Simulations of P2P Networks Kolja Eger, Ulrich Killat Hamburg.
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
The BitTorrent content distribution system CS217 Advanced Topics in Internet Research Guest Lecture Nikitas Liogkas, 5/11/2006.
FILE TRANSFER PROTOCOL Short for File Transfer Protocol, the protocol for exchanging files over the Internet. FTP works in the same way as HTTP for transferring.
Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.
CompSci 356: Computer Network Architectures Lecture 21: Content Distribution Chapter 9.4 Xiaowei Yang
Caching Dynamic Documents Vipul Goyal Department of Computer Science & Engg Institute of Technology, Banaras Hindu University Sugata Sanyal School of Technology.
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
A BitTorrent Module for the OMNeT++ Simulator MASCOTS 2009, London, UK G. Xylomenos (with K. Katsaros, V.P. Kemerlis and C. Stais)
BitTorrent Framework. Background BT is a very popular peer to peer protocol with many implementations: –
VoD BitTorrent Framework. Background BT is a very popular peer to peer protocol with many implementations: –
Fall 2007cs4251 Distributed Computing Umar Kalim Dept. of Communication Systems Engineering 31/10/2007.
Presented by Stephen Kozy. Presentation Outline Definition and explanation Comparison and Examples Advantages and Disadvantages Illegal and Legal uses.
Part 1: Overview of Web Systems Part 2: Peer-to-Peer Systems Internet Computing Workshop Tom Chothia.
1 Incentives Build Robustness in BitTorrent? Analysis on Bit Torrent Client performance By Jimmy Wong.
A P2P file distribution system ——BitTorrent Fan Bin Sep,25,2004.
© Lethbridge/Laganière 2001 Chap. 3: Basing Development on Reusable Technology 1 Let’s get started. Let’s start by selecting an architecture from among.
BitTorrent Background. Common Scenario Millions want to download the same popular huge files (for free) –ISO’s –Media (the real example!) Client-server.
On-Demand Media Streaming Over the Internet Mohamed M. Hefeeda, Bharat K. Bhargava Presented by Sam Distributed Computing Systems, FTDCS Proceedings.
Some recent work on P2P content distribution Based on joint work with Yan Huang (PPLive), YP Zhou, Tom Fu, John Lui (CUHK) August 2008 Dah Ming Chiu Chinese.
Hjemmeeksamen 1 INF3190. Oppgave Develop a monitoring/administration tool which allows an administrator to use a client to monitor all processes running.
The Bittorrent Protocol
Bit Torrent (Nick Feamster) February 25, BitTorrent Steps for publishing – Peer creates.torrent file and uploads to a web server: contains metadata.
BitTorrent Presentation by: NANO Surmi Chatterjee Nagakalyani Padakanti Sajitha Iqbal Reetu Sinha Fatemeh Marashi.
BitTorrent Internet Technologies and Applications.
GPS: A General Peer-to-Peer Simulator and its Use for Modeling BitTorrent Weishuai Yang Nael Abu-Ghazaleh
Advanced Web Design Scripting Tutorial Chapters. Scripting Intro The scripting part of the forthcoming Advanced Web Design textbook introduces you to.
Postacademic Interuniversity Course in Information Technology – Module C1p1 Contents Data Communications Applications –File & print serving –Mail –Domain.
BitTorrent Dr. Yingwu Zhu. Bittorrent A popular P2P application for file exchange!
A P2P file distribution system ——BitTorrent Pegasus Team CMPE 208.
Do incentives build robustness in BitTorrent? Michael Piatek, Tomas Isdal, Thomas Anderson, Arvind Krishnamurthy, Arun Venkataramani.
Bit Torrent A good or a bad?. Common methods of transferring files in the internet: Client-Server Model Peer-to-Peer Network.
Operating Systems Recitation 9, May 19-20, Iterative server Handle one connection request at a time. Connection requests stored in queue associated.
1 Welcome to CSC 301 Web Programming Charles Frank.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
B IT T ORRENT T ECHNOLOGY Anthony Pervetich. H ISTORY Bram Cohen Designed the BitTorrent protocol in April 2001 Released July 2, 2001 Concept Late 90’s.
Impact of Incentives in BitTorrent By Jenny Liu and Seth Cooper.
11/25/2015Slide 1 Scripts are short programs that repeat sequences of SPSS commands. SPSS includes a computer language called Sax Basic for the creation.
WWW: an Internet application Bill Chu. © Bei-Tseng Chu Aug 2000 WWW Web and HTTP WWW web is an interconnected information servers each server maintains.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Bit Torrent Nirav A. Vasa. Topics What is BitTorrent? Related Terms How BitTorrent works Steps involved in the working Advantages and Disadvantages.
09/13/04 CDA 6506 Network Architecture and Client/Server Computing Peer-to-Peer Computing and Content Distribution Networks by Zornitza Genova Prodanoff.
PEAR TO PEAR PROTOCOL. Pure P2P architecture no always-on server arbitrary end systems directly communicate peers are intermittently connected and change.
End-to-end Publishing Using Bittorrent. Bittorrent Bittorrent is a widely used peer-to- peer network used to distribute files, especially large ones It.
COMP2322 Lab 4 Socket Programming Toby Lam March 2, 2016.
Peer-to-Peer Networks 10 Fast Download Christian Schindelhauer Technical Faculty Computer-Networks and Telematics University of Freiburg.
November 19, 2016 Guide:- Mrs. Kale J. S. Presented By:- Hamand Amol Sambhaji. Hamand Amol Sambhaji. Pardeshi Dhananjay Rajendra. Pardeshi Dhananjay Rajendra.
Performance of P2P implementations
An example of peer-to-peer application
Introduction to BitTorrent
Designing a new BitTorrent Client
Chapter 27 WWW and HTTP.
Angelo Sapello University of Delaware
The BitTorrent Protocol
Content Distribution Networks + P2P File Sharing
Pure P2P architecture no always-on server
Chapter 2 Application Layer
Content Distribution Networks + P2P File Sharing
Presentation transcript:

VoD BitTorrent Framework

Background BT is a very popular peer to peer protocol with many implementations: – Torrent_clientshttp://en.wikipedia.org/wiki/Comparison_of_Bit Torrent_clients The first one was created in Python by Bram Cohen.

Real world motivation BitTorrent is common and Free Good chance there is a swarm for your movie VoD servers are expensive and complicated Its better to use P2P for VoD

Some definitions Delay (D) = How much time I am allowed to hold before starting to play M (Movie). Prefetch Time (P) = How much time before I watch byte B from M, it should arrive. Playback Rate (R) = How many bytes/second I watch B(t) – the index of the bit that must arrive by t. B(t) = R *(P+t-D)

Rules and Examples B(t) = R * (P+t-D) If R=5 KB/sec and D=6 seconds and P=2 seconds, than: –At t=6 seconds, I must have 10KB continuous from the start of the movie. –At t=18 seconds I must have 70KB continuous from the start of the movie.

What does one VOD client do Your client tries to get from the Bittorent clients pieces of data needed to play the video. Each piece needs to arrive before its deadline. If the piece does not arrive by the deadline you can download it “instantly” from the “server”. Each VOD client counts the data from server (DFS).

What is my goal Each byte taken from the server costs money, therefore you need to minimize DFS. Goal - Minimize the accumulated DFS of all the VOD clients that run concurrently.

How do I create my client Download GROUP_VOD_CODE.tar.gz from “BitTornado - Start with this Code” link in the course web page. –It is also in /users/courses/hanochworkshop/group_vod GROUP_VOD_CODE.tar.gz is a regular BT with StreamWatcher.py to monitor DFS. Any changed section is marked ###### GROUP VOD ###### Modify it to minimize acumulated DFS. Do not change StreamWatched.py.

Standard BT parameters --saveas F --max_upload_rate F.torrent

VOD client additional params SET = defined inside run_all.sh, not a parameter. delay – Wait before prefetch, in seconds. SET TO 20 prefetchT – How much time in advance the byte must arrive. In percent of movie length. SET TO 5% rate – VOD rate in KB/sec. SET TO 90 KB. order – How many run when client spawned. SET BY run_all.sh. Parameter of run_multiple.sh. gap – How much to wait between spawns – unit is pewfetchT. alg – Name of the algorithm. Default is ORIG. verbose – Print and kill the whole swarm when complete. peers_num – how many regular peers. seeds_num – how many seeds. Vod_num – how many VoD peers.

How do I test my idea cd /users/courses/hanochworkshop/voddiversegroup/vod_ tests run_multiple.sh –your_client - example: ~/GROUP_VOD_CODE/btdownloadheadless.py –Gap – example: 0 –output_location example: ~/bt_out –iteration example: 4 –empty/full example: empty –peers_num example: 16 –seeds_num example: 2 –vod_num example: 14

Execution example run-all.sh Tracker BT VOD BT run_multiple.sh VOD BT VOD BT VOD BT

How does it work? Run tracker Run the “world” Run your clients

How does it work? Both tracker and the “world” run on the same computer. Running a test: –Reserve time on pc-hanoch-w3/w4 in: Or from course www - "Scheduling computers for tests.“

Output to screen ================================================================================== total time: 1 min 07 sec share rating: ( KB up / KB down) saving: picture-100.bmp (27.5 MB) percent done: 18.9 time left: 4 min 52 sec download to: /home/pc-hanoch-w4/home/hillelav/name/picture.pc-hanoch-w4-4.bmp download rate: 93.4 kB/s upload rate: 80.6 kB/s seed status: 2 seen now, plus distributed copies peer status: 28 seen now, 10.7% done at kB/s StreamWatcher Csv stats: ~/out/1/statistics-order-4-gap-0.csv DFS is: bytes DFS/Total is: 29 % FullPieces: 63 / 220 DirtyPieces: 1 / 220 FaildHashChecks: 0 Prefetching 5 % Playing point: 56 / 220 ( 25 %) Only last VOD client prints

Output to.csv In ~/out you will find vod_num directories: /1, /2, …/ iteration. In each directory, you have vod_num files. Statistics in - order- -gap-.csv Order is how many VOD clients ran before. is the parameter Gap.

.csv file alg,dfs,p2p ORIG,5,0 ORIG,10,2 ORIG,15,6 ORIG,19,11 ORIG,23,16 ORIG,28,20 ORIG,31,25 ORIG,34,31 ORIG,37,36 ORIG,39,41.

total DFS and total P2P GAP = 2 File percentage

GAP = 0

Local DFS GAP = 2

GAP = 0

run_all.sh defaults Start –Use in run_multiple.sh Stop –Kill all python threads Kill –Kill all python threads and scripts.

To run client separately: PATH_TO_YOUR_VOD_CLIENT/btdownloadheadless.py --saveas F --delay D --prefetchT P --rate R --out_dir O Can add the parameters --order X in the IDE --gap G --group_size S --alg ‘ALG' --verbose F.Torrent

Python Very common script language IDE: –PyDev –WINGWARE Python IDE – not free, but very good. References: –python.org : – – The book "Think like a Computer Scientist in Python" has a very good reputation:

Getting started Run the environment –ssh pc-hanoch-w3 or pc-hanoch-w4 –cd /users/courses/hanochworkshop/group_vod/vod_tests –run_multiple.sh MyClient GAP output-directory –Note tracker prints a message for each GET. You can connect to the tracker, from the CS network, with a browser at: – k :6970/ k :6970/ Do ls -l /home/pc-hanoch-w k /home/hillelav/$USER to see downloaded files

Directory Structure Root – –high level application Root/BitTornado – –services Root/BitTornado/BT1 – –Actual work

Client Operation btdownloadheadless.py – First to run. –Performs initializations. get_response – parse the.torrent Infohash – the ID of the.torrent startEngine – Start connection with peers startRerequester - Start connection with tracker –Run rawserver.listen_forever from RawServer.py. –listen_forever is: Polling port executing func() from a task queue.

Receiving messages From listen_forever loop it goes to: –BT1/Connecter.py/got_message CHOKE UNCHOKE INTERESTED NOT_INTERESTED BITFIELD REQUEST CANCEL PIECE HAVE

Influencing decisions Can be done in one of the callbacks which spring from Connecter.py / got_message: Downloader.py –HAVE->got_have->send_interested Tune for VoD?

BT tracker Send GET request in Rerequester.py / announce Receive GET data in thread in Rerequester.py / _rerequest

Policy Choker.py/_round_robin – decide who to choke / optimistically un choke / send_have to. Downloader.py / _request_more. PiecePicker.py / next - rarest piece, etc. Tune for VoD? got_unchoke->_request_more->next…

More about the code Start your project from “BitTornado - Start with this Code” link. Click “BitTornado - Legacy Code Guide” for basic explanations about the code.