| P2P streaming technology developed quickly in recent years. Streaming technology can significantly reduce time delay and memory requirement for the whole media file need not completely download on the local disk when streaming media is played. As the Internet and web service become a commonplace, video on demand (VOD) and real time streaming services appear. Unfortunately, many streaming systems providing the above services still follow the traditional Client-Server(C/S) principle in which all the media service is provided by the server only. Under C/S architecture, the server's overload would be worsened by more clients joint in system. Under this circumstance, taking the weak points of C/S into account, a number of researchers presented several solutions for real time streaming system, for instance, IP multicast. In IP multicast, the network keeps only one copy of data packet on IP layer of TCP/IP, each client requires the data that can get the copy without affecting the original one. However, this method does not get enough support from rooter for violating the principle of simplicity on IP layer.Considering the aspects above, the P2P-based streaming system comes into being. This kind of system absorbs the advantages of both P2P and streaming system. The high capacity of service, ease of scalability, lower price and self-organization, those features plus NAT enable the P2P-based streaming system widely used on Internet, such as QQLive, PPLive and UUSEE. Every client in the system can either be data supplier or data consumer, and it can even be the both which is decided by the Point's service capability and requirement on streaming media. In the same time, system's real time feature is quite emphasized. The P2P real time streaming server described in this dissertation together with TCP agent and P2P client compose the P2P real time streaming system. This system introduces the mechanism of quick retransfer of lost data and proper partition of data piece in order to help meeting real time requirement.The main task in this dissertation includes the design, implementation and test of the P2P real-time streaming server. As the data source and allocator of P2P media, the system emphasizes the save, allocation and transmission of streaming media and it also makes a good attempt in combining transmission of C/S and P2P and it could be widely used in the high real time requiring place, such as video conference and live TV. |