文档介绍:教学单位
学生学号
XXX大学(学院)
毕业设计(论文)
题目:
年级:
学号:
姓名:
专业:
指导教师:
2011 年 6 月 19 日
摘要
P2P技术存在已久,新闻服务系统。随着1998年出现的音乐共享软件Napster的流行,着眼于分布式数据共享的P2P技术得到了迅猛的发展,并日益呈现出取代传统的C/S文件共享模式的趋势。
BitTorrent是P2P技术在文件共享领域最成功的代表之一。BitTorrent是一个开放的文件分发系统,它基于两个通信协议并由几种分工不同的网络节点组成。不同于普通的http或者ftp文件共享方式,BitTorrent采用一种全新的模式:资源的发布者最少只需要上传一份完整资源的数据量,之后的数据交换完全可以在BitTorrent下载者之间进行。本文将详细分析BitTorrent文件分发系统的关键部分123456BitTorrent协议客户端的实现。
本文从P2P的基本概念开始,首先介绍BitTorrent文件分发系统的组成,之后在此基础上解析BitTorrent的两个重要协议,最后重点分析一个轻量型BitTorrent协议客户端的实现。分析依照软件工程的思想,首先描述客户端的总体框架,包括功能模块、数据流和主程序的执行流程。在总体框架的基础上,具体分析客户端的各个功能模块的实现,其中将会重点讨论两个算法:piece选择算法和peer选择算法,这两个算法是BitTorrent的核心,分别在piece维护模块和peer维护模块里实现。
【关键词】P2P BitTorrent 文件分发系统文件分发协议客户端 GTK
ABSTRACT
P2P technology has existed for a long time, its first actual use can be traced back to 1979, the news service system. Since the music-sharing application Napster designed in 1998 became popular, P2P technology focusing on distributed data-sharing has been in rapid development and with a tendency to replace the traditional C / S file-sharing model gradually.
BitTorrent is one of the most essful classifications of P2P technology in file-sharing field. It is an open file distribution system, which is based on munication protocol and consists of work nodes in different roles. Unlike ordinary http or ftp file-sharing manner, BitTorrent uses a new model: the publisher of a resource only needs to upload at least a whole resource. After that, the exchange of data can be just done between the BitTorrent downloaders. This article will detailedly analyse the implementation of the pivotal part of BitTorrent file distribution system, a BitTorrent client.
This article will begin with the P2P basic concept, and then introduce the constitutes of the BitTorrent file distribution system. On the basis of that, it will analyse the two important Algorithms of BitTorrent. And finally it e with focus on the implementation of a lightweight BitTorrent client. In accordance with t