lyu0502 n.
Skip this Video
Loading SlideShow in 5 Seconds..
LYU0502 PowerPoint Presentation
Download Presentation

Loading in 2 Seconds...

play fullscreen
1 / 43

LYU0502 - PowerPoint PPT Presentation

  • Uploaded on

LYU0502. P2P Digital TV Recorder. Supervisor: Professor Michael R. Lyu Prepared by: Ho Tsz Wing, Andy Lau Wai Shun, Jack. Outline. Motivation Objective Development Platform Approach Performance Enhancement Erasure Code Analysis Future Work Conclusion Q&A. Motivation.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'LYU0502' - tokala

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript


P2P Digital TV Recorder

Supervisor: Professor Michael R. Lyu

Prepared by: Ho Tsz Wing, Andy

Lau Wai Shun, Jack

  • Motivation
  • Objective
  • Development Platform
  • Approach
  • Performance Enhancement
  • Erasure Code Analysis
  • Future Work
  • Conclusion
  • Q&A
  • Watching TV is a major entertainment activity for people
  • People often miss their favorite program because they have to work overtime or go out to travel
  • People need to schedule the recording of the programs
  • Allow people view to back previous TV program without doing scheduling themselves
  • Let the user view the program on demand
  • Increase the availability of the TV program
  • Achieve load balancing among the participating peers
develop platform
Develop Platform
  • Windows XP Media Center Edition
  • First released in Aug. 2003
  • Capable of watching DVD, recording TV, listening to music and sharing digital photos
  • Media Center Edition 2005 SDK – Click-To-Record Feature
    • Enables applications to programmatically schedule the recording of TV programs
    • Supported in Visual C#.Net
windows xp media center edition
Windows XP Media Center Edition
  • Need an Electronic Program Guide (EPG) in order to schedule the recording
    • Use TVxb to convert the schedule obtained from webpage to an XML format
    • Use Quickguide to convert the XML schema to the EPG
  • Interface of the application
  • There are different types of peer-to-peer file sharing architectures according to their “degree of centralization”
    • Hybrid decentralized architectures (Napster)
    • Purely decentralized P2P architectures (Gnutella)
    • Partially centralized systems (KaZaA)
  • In this term, we choose to implement our system using the hybrid decentralized architectures
  • There is a centralized server maintaining the list of online peers and the directories of the shared files
  • The server is also responsible to schedule the recording to the online peers in a fair and efficient way
  • On the other hand, the peers are responsible to handle the scheduling request made by the server
  • Also, they need to serve the downloading request from other peers
  • Reasons to choose the hybrid decentralized architectures
    • It is simpler to implement
    • It serves as a model for us to investigate the feasibility of the project and measure the performance of the system under different peers behavior
    • After implementing our system using the hybrid decentralized architectures, it is relatively easier for us to deploy it to the purely decentralized P2P architectures
  • Component of the server
    • p2p.mdb – database which maintains the peer table and share table
    • Login.asp – make entries in the peer table and share table when a user login
    • Search.asp – search the file requested by the user and generate suitable response
    • Userlist.asp – return the list which contains the information of the currently logged-in peers
    • Updateshare.asp – update the share table after a user recorded or downloaded a program
    • Xml.asp – return the schedule of all the channels in a particular date
    • Logout.asp - delete entries in the peer table and share table when the user logout
  • The client side application


Login to the system through login.asp

Listen to incoming connection

Download request


Recording request

Upload request

Search peers using




Schedule the recording

Using click-to-record


Upload the requested

file to the peers

Connect to the peers

and start downloading

Logout the system through logout.asp



The Apprentice (III)


Suppose Alice wants to see the program “The Apprentice (III) “

She will send a query to the server

She will then make a direct connection to Bob to get the file

The server will reply to Alice with the list of peers (Bob) that have a copy of “The Apprentice (III) “



performance enhancement
Performance enhancement
  • How to schedule the recording tasks to the peers effectively?
  • How to increase the availability of the video files?
  • How to improve the performance of retrieving the video files from peers?
scheduling policies
Scheduling policies
  • Policies:
    • Do scheduling 15 minutes before the program start
    • Select the peers randomly
    • N peers will be scheduled
    • In this project, N is assigned to be 2
  • Assumptions:
    • The selected peers will not leave manually
    • The peer who gets the whole video file has the responsibility to do the encoding process
scheduling policies1
Scheduling policies
  • The server side application


Send the xml recording

request to the selected peers

Obtain the schedule of all

channel at 5:40 am everyday

Get 2 randomly selected

peers from userlist.asp

Schedule the recording of

all program

15 minutes before the

start of a program


Scheduling policies

15 minutes before the program starts, the server will randomly send it’s schedule to any two of the online peers



availability enhancement
Availability enhancement
  • Whole file replication (WFR)

Advantages: 1) Multiple access of the video files

2) No decoding needed

Disadvantages: 1) Storage overhead is large

2) Replication time is long

  • Erasure Code replication (ECR)

Advantages: 1) Multiple access of the video files

2) Storage overhead is small

Disadvantages: 1) Encoding and decoding time

2) Difficult to implement

whole file replication
Whole File Replication

  • Do replication on the whole file
  • Redistribute the file to other peers
whole file replication1
Whole File Replication
  • Replication factor  r
  • Peers availability  P
  • Total Number of Peers  N
  • Availability
  • Independent of N
  • When P  1, A(w)  1
  • When r  , A(w)  1
erasure code background
Erasure Code - Background

Message n blocks

Encoding (to m blocks, where m > n)

Decoding (Requiresany nblocks)

Message n blocks

erasure code implementation
Erasure Code - Implementation
  • Divide the video file into n fragments
  • Code these n fragments in m (m>n)
  • Any n (unique) fragments are able to

reconstruct the video files

  • Send the fragments to random peers
erasure code
Erasure Code

  • Do encoding on the whole file
  • Redistribute part of file to other peers
erasure code analysis
Erasure Code - Analysis
  • Replication factor  r
  • Divide the video file into n fragments
  • Code these n fragments in m (m>n)
  • Stretch factor  s = m/n
  • Any n (unique) fragments are able to

reconstruct the video files

comparison wfr vs ecr
Comparison – WFR Vs. ECR
  • Whole File Replciation - Availability
  • Erasure Code Replciation - Availability
availability analysis conclusion
Availability Analysis - Conclusion
  • If the storage is not limited, ECRperforms better than WFR in most cases.
  • When peer availability large than 0.5, the performance of WFR tends to ECR if the replication factor increases.
  • However, the storage is limited in real world
storage analysis conclusion
Storage Analysis - Conclusion
  • If the peers availability is high, ECR is more storage-effective than WFR.

Adopted from : Replication Strategies for Highly Available Peer to Peer Networks,

Ranjita Bhagwan et. al,

block size analysis r 2
Block Size Analysis – r = 2
  • If the storage is limited, the performance of erasure code replication will highly depends on the peer availability

Adopted from : Erasure Code Replication Revisited,

W.K. Lin, D.M. Chiu, Y.B. Lee

future work
Future Work
  • Implement the system in Server-less way
  • Design a algorithm for placing the encoded check blocks
  • Investigate the relationships between popularity and download frequency of a TV program (Dynamic replication factor)
  • Implement choking algorithm to encourage users to share their own contents.
  • We have implemented the P2P system in the Server-Client model.
  • The availability of the TV Programs are enhanced by using Erasure Code Replication.
q a session

Q&A Session

Thank you very much