摘要
Peer-to-Peer网络毫无疑问是当今的热点技术主题。Napster和Gnutella的广泛使用证明了peer-to-peer应用的强大潜力。P2P(或者说peer-to-peer)网络是一种基于操作上下文的网络模型,任何一个节点都同时作为客户机和服务器。JXTA致力于为P2P应用提供一个P2P平台基础。其中包括一系列独立于语言,平台和网络技术之外的协议。这些协议解决了P2P应用的基本需求。协议的设计目标是简单并且低成本。本论文设计探讨了P2P网络的结构和JXTA的基本知识,并利用JXTA开发出一个组内聊天和共享文件的软件。
关键词: P2P,Peer,PeerGroup,Advertisment,XML,JXTA,CMS
ABSTRACT
Peer-to-Peer (P2P) network is a hot topic in technology in recent years. The wide use of Napster and Gnutella demonstrated the powerful potential in application of P2P. The P2P network is a model of network which based on the environment of operation, and each node can work as client and serve at the same time. JXTA offers a basic platform for the application of P2P. And it includes a series of treaties which independence from languages, platform and technique of network. These treaties can meet the basic requirement of the application of P2P。The aim of these treaties is compact and the cost must be low. This article has discussed the structure of P2P network and the basic knowledge of JXTA, and developed a software for chat and share documents in a group from JXTA technique.
Key words: P2P,Peer,PeerGroup,Advertisment,XML,JXTA,CMS
目 录
第一章 绪论-------------------------------------------------------------------------------------1
1.1 P2P发展简史------------------------------------------------------------------------1
1.2 P2P应用程序的用武之地 ---------------------------------------------------------4
1.3 P2P技术的动力 -------------------------------------------------------------------5
第二章 P2P体系结构---------------------------------------------------------------------6
2.1 P2P网络------------------------------------------------------------------------------7
2.2 P2P如何形成动态网络-------------------------------------------------------------9
2.3 节点自制-----------------------------------------------------------------------------14
2.4 支持混合模型-----------------------------------------------------------------------15
第三章 JXTA技术----------------------------------------------------------------------------20
3.1 JXTA是什么------------------------------------------------------------------------20
3.2 JXTA的概念------------------------------------------------------------------------22
3.2.1 Peer(对等机)---------------------------------------------------------------22
3.2.2 Peer Group(对等组)-------------------------------------------------------23
3.2.3 Endpoint(端点)-------------------------------------------------------------23
3.2.4 Pipe(管道)------------------------------------------------------------------24
3.2.5 Advertisement(广告)------------------------------------------------------25
3.2.6 Message(消息)-------------------------------------------------------------26
3.2.7 Rendezvous Peer(集合点)-----------------------------------------------26
3.2.8 Router Peer(路由Peer)-------------------------------------------------28
3.29 Gateway Peer(网关Peer)--------------------------------------------------28
3.3 用于通信的Peer-------------------------------------------------------------------29
3.3.1 防火墙------------------------------------------------------------------------29
3.3.2 NAT(网络地址转换)------------------------------------------------------29
3.3.3 代理服务器------------------------------------------------------------------30
3.3.4 DHCP(动态IP分配)-----------------------------------------------------30
3.3.5 网络的不稳定---------------------------------------------------------------31
3.3.6 网关问题---------------------------------------------------------------------31
3.4 Peer和对等组----------------------------------------------------------------------32
3.4.1 Peer和用户的关系---------------------------------------------------------32
3.4.2 对等组的必要性------------------------------------------------------------32
3.4.3 JXTA应用程序与对等组-------------------------------------------------34
3.4.4 对等组的成员资格---------------------------------------------------------34
3.4.5 对等组的服务---------------------------------------------------------------35
3.5 广告(Advertisement)-------------------------------------------------------------37
3.5.1 广告的类型------------------------------------------------------------------37
3.5.2 模块(Module)广告-------------------------------------------------------41
3.5.3 管道广告---------------------------------------------------------------------51
3.5.4 端点路由消息---------------------------------------------------------------52
3.5.5 消息(Message)----------------------------------------------------------53
3.6 JXTA Content Manage Service(CMS)------------------------- -------------------54
3.6.1 CMS概述--------------------------------------------------------------------54
3.6.2 CMS简单搜索-----------------------------------------------------------55
第四章 P2P软件设计-------------------------------------------------------------------56
4.1 需求分析----------------------------------------------------------------------------56
4.2 类设计-------------------------------------------------------------------------------56
4.3 程序运行效果----------------------------------------------------------------------65
第五章 结论------------------------------------------------------------------------------------67
参考文献------------------------------------------------------------------------------------68
致谢------------------------------------------------------------------------------------------69
附件------------------------------------------------------------------------------------------70