Font Size: a A A

The File Sharing System Based On P2P

Posted on:2008-01-04Degree:MasterType:Thesis
Country:ChinaCandidate:H Y WangFull Text:PDF
GTID:2178360215952536Subject:Computer application technology
Abstract/Summary:
With the development of information technology, people have the biggerrequirement to get network resource.P2P comes to us. Contract to traditionalC/S pattern, because P2P doesn't depend on Server completely, the system'sbottleneck has been solved, and the stability of network has beenimproved.P2P also provides the new way to communicate directly for theusers. They can transfer file directly without any middle tache, which makesthe network's sharing and freedom come true. P2P's appearance is a bigimprovementandchangeforthedevelopmentofnetwork.P2P is decentralizing network. It make user use the files throughconnecting many PCs without using centralized Server. In recent years,P2Phas a great growth.P2P has some successful softwares in file sharing, equitycompute, Instant message and cooperation operation and so on, this providesconvenience for network users. At present, there are three popular instructuresin using, pure P2P modeling, centralizing P2P modeling and mixed P2Pmodeling. Mixed P2P modeling combines the advantages of the former twoonesmentionedabove. It usesservertostorefileinformation,provides thefilesearching, but, files are stored in the Client, which make P2P fancier's favorandlove.P2P has great advantages in file sharing application. Now, many filesharing software and protocol have been used. For example, Napster, Kazaa,Gnutella etc. However, eDonkey 2000 protocol is one of the most successfulfile sharing protocols. It uses separate file sharing protocol of decentralizingserver. On the contrary to Gnutella, it isn't completely decentralized. Because it uses Server. Contrast to Napster. It doesn't use single server, uses the serverof super user used, and provides the communication between Servers.Different with Kazaa,Morpheus, Gnutella these P2P protocols, eDonkeynetwork is C/S based on structure, server likes super node of Kazaa, but theydon't share any files, and only manage information distributing. It looks likeseveral central dictionaries, and stores the sharing files and Client informationthat file stored. In the eDonkey network, every Client is the node of sharingdata. Their files make indexes in Server. If they want to find a segment of afile, they must connect to a Server using TCP, or they send a short search tooneormoreserverstogettheClientinformationofsharingthefile.To get the file information quickly, we must study search arithmetic. Iuse Lucene in my system. The searching arithmetic belongs index searches, itmeans that doing a whole text index for file and character token,and make aquicklyindex.Thesearchingofthe paperaims to providethesearchingfor filename,file size and file extend name.When the searching bases the file name,itis important to cut the name correctly.However,Lucene is limited on thesupportingof the cutting words have studies the implementation of the cuttingChinese words, the basis methods and the technology,and basing on these, Ihave improved the Lucene and used the cutting words based ondictionary.Firstly,I created a dictionary, and then created a words tree.Whencutting the words, I use the way of matching maximum words, and make aindex ofthecuttedwords.Bythis way,the system provides thequicksearchingforthefiles.Thepaperresearches the basis theoryofP2P,implementationinstructure,the character and development future. I deeply understand the advantagement and disadvantage of existing P2P file sharing systems, analyze eDonkeycontent and implementation mode, study Lucene searching theory and codeimplementing, improve the cutting words for Chinese, and use the cuttingwords based on dictionary. This can improve the efficiency of file searchingand assure the correctness of the file searching. It aims to provide file sharingsupportforenterpriseofficesystemofLAN,makegettingfileandinformationconvenient.Finally, I use Java, based on eDonkey and P2P mixed instructure, useLucene searching arithmetic and the cutting words based on dictionary, andfinally succeed in implementation a file sharing system of LAN office. Thesystem stores basis informationofsharingfileof everyclient andprovides filesearchingbyusing a Server, but file is stored in the Client. When Client sendsthe request of file searching, server searches the requested file in the database,and then sends the file location of Client. By this way, the Client can get thelocationinformationoffilestoried;thetwoclientscancommunicatewitheachother directly. The system also provides stop-continue function to support filethat is not completed to continue download, and uses Lucene and the cuttingwordsbasedondictionarytoimproveefficiencyoffilesearching.Several points need say, because of the system are application of LAN,we assume that every user is creditable, that means all communications aresafe. When the size of file is too large, it is necessaryto download from manyclients. Since the time is limited, the system doesn't contain these functions, itneedbestudiedinfuture.The system succeed in providing excellent support to enterprise officesystem of LAN, and help employee search file, so it is convenient to use files by the system;It provides the function of stop-continue to help employeetransferalargesizefile.Thesystemusesthecuttingwordsbasedondictionary,and improves the efficiency and correctness of the file searching ;Because theServer is responsible for storing the information of file name and location, theserver doesn't need have high load and configure, this saves expending tosome extent;The system uses the simple menu operation to provide allfunctions,so,itisveryconvenientfortheusers.
Keywords/Search Tags:Sharing
Related items