Download Document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Conducted by:
Cheng Wen Chi
Chiu Kwok Shing
Choi Kwok Yam
Advised by Prof. Danny Tsang
TD1a-09, BEng of Computer Engineering, HKUST
Introduction
What is P2P IPTV?

What is IPTV

IPTV is a system that deliver digital television content through
Internet Protocol

What is P2P

P2P is any distributed network architecture composed of
participants that make a portion of their resources directly
available to other network participants, without the need for
central coordination instances.
TD1a-09, BEng of Computer Engineering, HKUST
2
Background
• Motivation to start the project.
Rapidly development of network technology in
Hong Kong
• (77% household broadband penetration - by OFTA)
HDTV become part of our life.
Advantage of P2P model on HDTV
broadcasting.
TD1a-09, BEng of Computer Engineering, HKUST
3
Purpose and Aim
This project examines streaming IPTV over P2P
networks with high quality(up to 1000kb/s) video in
the different approaches, in order to create a low
delay, high quality IPTV application, thus different
P2P algorithms may be applied, such as pure push,
hybrid, etc.
TD1a-09, BEng of Computer Engineering, HKUST
4
What our system look like?
Client-side application
Video Server
Tracker
TD1a-09, BEng of Computer Engineering, HKUST
5
What our system look like?
TD1a-09, BEng of Computer Engineering, HKUST
6
Presentation Flow
P2P network management
• Presented by Cheng Wen Chi
Data format and hybrid algorithm
• Presented by Choi Kwok Yam
Libraries and Statistic Tools
• Presented by Chiu Kwok Shing
Results and Findings
TD1a-09, BEng of Computer Engineering, HKUST
7
P2P network management
•
•
•
•
•
Tracker Server
Channels
Peers Connection
Registration & Deregistration
Reconnection & Loop Handling
– Presented by Cheng Wen Chi
TD1a-09, BEng of Computer Engineering, HKUST
8
Tracker
Tracker server
• Centralized database which maintain info of P2P network
– P2PTV client
– Channel info. of streaming server
• Maintain the P2P network topology and connection
4 main services:
• Channel registration
• Peer list request
• Peer registration
• Peer deregistration
11. DeRegister the Child Peer
if connection fail
Parent Peer
7. Peer Connect
Request
9. Connect To Server
10. Register the Child
to Tracker
0. Channel Registration
8. Reply Port
Video Server
Tracker Server
Peer
Deregistration
Channel
Selection
3.
Peer
Selection
6.
1. Channel Request
2. Reply Channel List
4. Peer List Request
TCP Handler
Peer List
Information
TCP Handler
Child Peer
Peer
Registration
Peer
Information
Peer
Request
5. Reply Peer List
TD1a-09, BEng of Computer Engineering, HKUST
Channel
Registration
9
Channels
• Multiple broadcast channels
• Each channel is registered by a streaming
server
• Channel information include
–
–
–
–
channel name
streaming server IP
sub stream size
video size
• Channel information is downloaded by
peer when client terminal start up
TD1a-09, BEng of Computer Engineering, HKUST
10
Connection
•
•
•
•
Sub streaming algorithm
Individual TCP connection for each sub stream
Different thread handle each sub stream connection
For upload stream, select TCP ports which available for
remote connection
• Provide TCP ports information to child peers for new
connection process
– Data port
– Control port
TD1a-09, BEng of Computer Engineering, HKUST
11
Connection Establishment
Flow of connection establishment
• Download peer list of selected
channel
• Select a peer from peer list
based on selection algorithm
• Request a new connection with
selected peer
• Peer provide a pair of TCP ports
for data and control connection
TD1a-09, BEng of Computer Engineering, HKUST
12
Registration
• Parent peer registers its child peers
• Register to tracker individually in each tree
• Information of registration
–
–
–
–
Child peer id
Parent peer id
Sub stream id
Channel id
• connection map between peers is maintained in
tracker
• Used for loop detection and optimization of P2P
network
TD1a-09, BEng of Computer Engineering, HKUST
13
Disconnection
Causes of disconnection
1. TCP connection timeout
2. Continuous miss chunk
3. Chunk sequence no. out of range
•
•
Disconnection log store in local peer list
Use for peer selection of reconnection
TD1a-09, BEng of Computer Engineering, HKUST
14
Deregistration
• Deregistered by parent peer
• Deregistration message which include
– Parent peer id
– Child peer id
– Tree id, channel id
Start
Connection Exist
Parent Monitor the
Child Connection
• Tracker verify the deregistration
request by matching the parent id and
child id in registration records
Disconnected
Check Child’s
Parent ID
Different
Identical
Deregister the
child to Tracker
TD1a-09, BEng of Computer Engineering, HKUST
End
15
Recursive Deregistration
• Deregistration problem of inter
peer of sub tree
• Take place when a sub tree is
connected from P2P network
• Tracker recursively detect the
connection status of its
offspring in the sub tree
• If peer (offspring) is offline,
tracker will deregister it from
the sub tree
TD1a-09, BEng of Computer Engineering, HKUST
16
Reconnection
• Root peer operate on reconnection process
• Child peers within the sub tree will keep its
connection with its parent peers
• New peer from local copy of peer list
• Peer selection algorithm select peer based on
– Miss rate
– Timeout rate
TD1a-09, BEng of Computer Engineering, HKUST
17
Loop Detection
• Loop connection may formed after reconnection
of sub stream
• Detected by periodic WAIT message
• When root peer is disconnected, it generates
WAIT message with its peer ID to its child peers
• Child peers forward the WAIT
message to its grandchild
• Streaming loop detected
by the WAIT message ID
TD1a-09, BEng of Computer Engineering, HKUST
18
Loop Detection
2)Receive
Wait 5
1)Reconnected
3)Loop detected
4)Disconnected
TD1a-09, BEng of Computer Engineering, HKUST
19
Data format & hybrid algorithm
•
•
•
•
Data format & encryption
Sub-Streaming
Push algorithm
Pull algorithm
– Presented by Choi Kwok Yam
TD1a-09, BEng of Computer Engineering, HKUST
20
Data format
•
Four containers of VLC streaming server
TD1a-09, BEng of Computer Engineering, HKUST
21
Data Encryption
Transport Stream (TS)
4 Bytes
184 Bytes
Header
Video Payload
Streaming chunk
<Header>
182 Bytes
SN
<Payload>
(Number of TS packets* 188) Bytes
TSPL
TS TS
SN: Sequence Number
TSPL: Total TS packet length
TS: Transport Stream packet
…
Data Encryption
TCP packet
40 Bytes
TCP Header
Data Payload
Header
…
TS
Header
Video Payload
<Streaming chunk>
<TS Packet>
Each streaming chunk include 20 TS packets
Data Payload size: 3942 bytes
Overhead of each streaming chunk: 6%
TD1a-09, BEng of Computer Engineering, HKUST
23
Sub-streaming
Peer A
Single stream of chunk with Sequence number {1, 2, 3…10}
1
2
3
4
5
…
6
9
Combine & Decompose
Three sub-streams {S1, S2, and S3}
S1
1
4
7
S2
2
5
8
S3
3
6
9
10
…
…
…
S1
10
S2
S3
Peer C
S1
Peer B
S2
S1
S3
S2
S3
Sequence number represent its playback sequence in the stream
P sub-stream :
q-th sub-stream contains chunks with sequence numbers = (nP + q)
where n is a positive integer from zero to infinity,
and q is a positive integer from 1 to P.
TD1a-09, BEng of Computer Engineering, HKUST
24
Push algorithm
•
•
Do not exchange the sequence number of chunks
The parent node will send the latest chunk to the child node continuously.
1
Parent node
Child node
2
1. Connection request
2. Connection success
3. Send latest chunk (n)
4. Send chunk (n+1)
3
4
.
.
.
Time
Time
TD1a-09, BEng of Computer Engineering, HKUST
25
Pull algorithm
1. Detection
•
•
•
Implemented in the state of pushing video chunk.
The missing chunks will not be recovered during sub-streams
reconnection
The expected sequence number = last received sequence number + total
sub-stream number.
•
Example (3 sub-streams)
S1
1
4
10
S2
2
5
8
S3
3
12
15
…
…
…
Miss chunks
S1: 7
S3: 6,9
TD1a-09, BEng of Computer Engineering, HKUST
26
Pull algorithm
2. Recovery
Request side:
Chunk request
Missing
Chunk List
Filter
Peer A
Response
Peer
selection
process
1.
2.
3.
4.
Upload
Playback
Peer selection process(e.g. peer B)
Sequence number of missing chunk
Compare missing sequence number and video playing sequence number
Copy missing chunk to playback or upload buffer
TD1a-09, BEng of Computer Engineering, HKUST
27
Pull algorithm
Response side:
Chunk request
Peer A
Peer B
Response
1. Search sequence map
2. Copy the chunk from upload buffer
Sequence
map
Buffer
TD1a-09, BEng of Computer Engineering, HKUST
28
Libraries and Statistic Tools
• Video library and Implementation
• XML Database Library
• Statistic Tools Plug-in
– Presented by Chiu Kwok Shing
TD1a-09, BEng of Computer Engineering, HKUST
29
Video Library
• DLL library Creation to access VLC library
• Video broadcast function
• Virtual Server broadcast and Video buffer
TD1a-09, BEng of Computer Engineering, HKUST
30
Video Library
• What is VLC?
– a free and open source media player and
multimedia framework written by the
VideoLAN project
• Advantage of VLC?
– Support large number of encode/decode
format
– build up network stream through TCP
– Flexible
• Reason to build up DLL library.
TD1a-09, BEng of Computer Engineering, HKUST
31
Video Broadcast
Server
VLC
Player
Layer A
GUI
TD1a-09, BEng of Computer Engineering, HKUST
Tracker
Internet
Client
Layer B
VLC
Player
GUI
32
Virtual Server & Video buffer
Start
Waiting core
player connection
No
Connection
Success?
End
Start
Yes
Yes
Receive Data and
Store in Buffer
Load data
buffer
No
Connection
Closed?
No
Accumulated
enough buffer ?
Broadcast
to player
No
Stop
Playing?
Yes
Yes
Send to
Virtual Server
Close
Connection
Virtual Server
Video Buffer
TD1a-09, BEng of Computer Engineering, HKUST
33
XML Database Library
• What is XML
– a file type that included a set of rules for
encoding document
• Advantage of XML database
– Cross platform
– Low operation cost
• Role of XML database within the system
– Database to store system information
TD1a-09, BEng of Computer Engineering, HKUST
34
Statistic Tools Plug-in
• Why we develop the Statistic Tools?
TD1a-09, BEng of Computer Engineering, HKUST
35
What the tool can do?
•
•
•
•
Upload Speed graph
Download Speed graph
Upload Log
Download Log
TD1a-09, BEng of Computer Engineering, HKUST
36
How the tool work?
Statistic Application
Client-side Application
TCP Handler
Graphical User
Interface
TCP Handler
Data
Stream
Client
Speed
Statistic
Decode
Statistic Handler
Send Start and
End Time Stamp
Send Start and
End Time Stamp
Upload
Stream
Download
Stream
P2PTV statistic application model
No
Start
Listen for
Client
Received
Data?
Yes
Graph
Created?
Yes
Append data
to XML file
Display
data in GUI
No
Create New
Graph and XML
Flow chart of the model
TD1a-09, BEng of Computer Engineering, HKUST
37
Result & Findings
Playback Hit Rate
Recover Rate
Playback Overhead percentage
TD1a-09, BEng of Computer Engineering, HKUST
38
Results & Findings
Playback hit rate
= number of chuck played by VLC/ number of chunk received
PlayBack hit rate
Test Result with1500kbps Mp4 video
120%
Percentage
Playback Hit Rate
Sub-stream
Number
Push
Pull
45%
45%
2
4
97.56% 96.86%
8
98.45% 98.77%
100%
Push
80%
Pull
60%
40%
20%
0%
Sub-streams
4
2
Test Result with 360kbps Mp4 video
PlayBack Hit Rate
101.00%
100.00%
Percentage
Playback Hit Rate
Sub-stream
Number
Push
Pull
99.90% 99.96%
2
4
99.73% 99.93%
8
99.78% 99.84%
8
99.00%
Push
98.00%
Pull
97.00%
96.00%
95.00%
2
TD1a-09, BEng of Computer Engineering, HKUST
4
Sub-stream s
8
39
Results & Findings
Recover Rate
Test Result with 1500kbps Mp4 video
4
8
71%
87.43%
100.00%
90.00%
80.00%
70.00%
Percentage
Recover rate
Sub-stream
Number
Pull
15.24%
2
Recove rate
60.00%
50.00%
Pull
40.00%
30.00%
20.00%
10.00%
0.00%
2
4
8
Sub-streams
Recover Rate
= number of chunk pulled / number of chunk missed
TD1a-09, BEng of Computer Engineering, HKUST
40
Results & Findings
Playback Overhead Percentage
Test Result with1500kbps Mp4 video
Total overhead Rate
6.90%
Percentage
Playback Overhead
Sub-stream
Number
Push
Pull
2
6.92% 6.93%
4
6.60% 6.76%
8
6.59% 6.59%
7.00%
6.80%
6.70%
Push
6.60%
Pull
6.50%
6.40%
2
4
Sub-streams
8
Playback overhead= (1-chunk overhead)*overhead of each chunk + chunk
overhead
Chunk overhead= 1- hybrid receive chunk/hybrid upload chunk
Overhead of each chunk = (total size of streaming chunk - total size of video
payload)/(total size of streaming chunk + size of TCP header)
TD1a-09, BEng of Computer Engineering, HKUST
41
Thanks for your
attention!
TD1a-09, BEng of Computer Engineering, HKUST
43
Related documents