Download presentation
Presentation is loading. Please wait.
Published byRoland Harvey Modified over 9 years ago
1
GRAPES: a Generic Environment for P2P Streaming Luca Abeni, Csaba Kiraly, Alessandro Russo, Marco Biazzini, Renato Lo Cigno
2
GRAPES Generic Resource Aware P2P Environment for Streaming An open-source toolkit Simplifies implementation of P2P streaming solutions Does not impose Any approach Any programming style
3
Requirements Portability Portability Written in C Written in C No dependencies on external libraries, … No dependencies on external libraries, …
4
Requirements Neutrality Neutrality Should not impose any particular structure to the applications using it Should not impose any particular structure to the applications using it No concurrency handling No concurrency handling No support for parallel activities No support for parallel activities No code for receiving data from peers No code for receiving data from peers
5
Requirements Modularity Modularity GRAPES functionalities are grouped into modules GRAPES functionalities are grouped into modules Each module Each module Has its own API Has its own API Can be used independently from the others Can be used independently from the others
6
Communication Applications based on GRAPES communicate through messages Applications based on GRAPES communicate through messages Messages are sent sent by a network helper Messages are sent sent by a network helper Allows easy change of the protocol used for transmitting the messages Allows easy change of the protocol used for transmitting the messages
7
Communication GRAPES modules can Directly send messages by invoking the network helper) Simply construct them, leaving to the application the responsibility of sending them
8
Overall Structure GRAPES includes GRAPES includes A network helper A network helper A Peer Set data type, to store information about peer’s neighbors A Peer Sampling mechanism, providing each peer with continuously up- to-date random samples of the entire population of peers; A Chunk Trading module, allowing to send/receive pieces of a media stream (called chunks); A Chunk Buffer, used to store the received chunks so that they can be forwarded to the other peers; A Chunk ID Set data type, that can be used to send signalling informa- tion about the received or needed chunks; Scheduling functions
9
Overall Structure GRAPES includes GRAPES includes A network helper A network helper A Peer Set data type, to store information about peer’s neighbors A Peer Set data type, to store information about peer’s neighbors A Peer Sampling mechanism, providing each peer with random samples of the entire population of peers A Peer Sampling mechanism, providing each peer with random samples of the entire population of peers A Chunk Trading module, allowing to send/receive pieces of a media stream A Chunk Trading module, allowing to send/receive pieces of a media stream
10
Overall Structure A Chunk Buffer, used to store the received chunks so that they can be forwarded to the other peers A Chunk ID Set data type, that can be used to send signaling information about the received or needed chunks; Scheduling functions
11
Peer Sampling Most important functions include Most important functions include Init() to initialize the peer sampling service ParseData() to handle peer sampling messages coming from another peer is received) AddNeighbour() to provide the ID of known peers (mainly used for bootstrapping) GetNeighbourhood() to return a list of the known peers
12
Signaling and chunk trading GRAPES provides a chunk ID set GRAPES provides a chunk ID set encodeChunkSignaling() allows the implementation of buffermap messages chunk offers (of one or more chunks) chunk accepts (responses to an offer) chunk requests (for one or more chunks) chunk delivers (response to a request)
13
The chunk buffer Stores Stores chunks received by an application Most important functions are: cb init() (to initialize a chunk buffer), cb add chunk() (to insert a new chunk) cb get chunks() (returns an ordered list of the chunks in the buffer)
14
The chunk buffer Different buffer management policies are possible: Buffer discards chunks when a maximum size has been reached Chunks are discarded when the difference between their playback time and the current time is too large …
15
Scheduling Involves decisions such as Involves decisions such as Selecting the chunk to be sent and the target peer in applications that periodically send chunks neighbours Selecting a set of chunks to be requested from a neighbour, and that neighbour
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.