For P2P mesh-based live video streaming, peers are arranged in a randomly connected overlay. In this system, each peer has information about every other peer in the system but only connects to a small number of neighbouring peers. Each peer is able to receive information from multiple neighbors. If one neighbor leaves, the peer can continue to get the video stream from other connected neighbors, and may add more neighbors to its connection set. This makes mesh systems quite robust against network changes.
When a peer tries to connect to the network, it first has to contact a bootstrapping node to get information about a subset of peers it might connect to. The new peer chooses one peer from that set and tries to establish a connection. If the connection is established, it starts to receive the video stream. At this point, other peers might connect and receive the video stream from it. Peers communicate to each other on a regular basis by sending messages. The architecture of the network may change when peers connect and disconnect, or when there’s an opportunity to increase performance.
Mesh systems transfer video data in segments. The video is split into small segments by the streaming server. Each segment has a unique identification number. In general, segments are not received in sequential order since each may go through a different path. At the destination, the segments must go through a buffer where they can be rearranged into the right sequence.
There are three possible methods of data exchange between peers: push, pull and hybrid. In the push method, a peer pushes received segments to its connected peers. In this case, a peer may push segments to a peer that already has them, or two peers may push the same segment to the same peer. All of these redundant pushes waste bandwidth. To resolve this issue, a schedule of segment pushing can be created. This schedule can be updated based on peer arrivals and departures.
For the pull method, a peer requests required chunks from one of its connected peers. Each peer stores which segments it has available in a buffer map. Peers periodically exchange their buffer maps with their neighbors. When a peer receives a buffer map, it checks which segments it needs and requests them from the neighbor. This avoids sending segments redundantly. The system is robust since a particular video segment may be available from multiple connected peers, so if one leaves it can still be received from others. The pull method requires a lot of signaling caused by requests and buffer map exchanges, so it introduces some additional latency.
The hybrid method is a combination of the push and pull methods. Some segments are sent by pushing, and others by pulling. Pulling packets are delivered by request. After that, the neighbor continues pushing packets to the same peer for some time interval. This significantly reduces the number of requests. The hybrid method combines the advantages from the push and pull methods such as low latency and robustness.