The World of Peer-To-Peer (P2P)/All Chapters
Total Page:16
File Type:pdf, Size:1020Kb
The World of Peer-to-Peer (P2P)/All Chapters en.wikibooks.org December 29, 2013 On the 28th of April 2012 the contents of the English as well as German Wikibooks and Wikipedia projects were licensed under Creative Commons Attribution-ShareAlike 3.0 Unported license. A URI to this license is given in the list of figures on page 125. If this document is a derived work from the contents of one of these projects and the content was still licensed by the project under this license at the time of derivation this document has to be licensed under the same, a similar or a compatible license, as stated in section 4b of the license. The list of contributors is included in chapter Contributors on page 123. The licenses GPL, LGPL and GFDL are included in chapter Licenses on page 129, since this book and/or parts of it may or may not be licensed under one or more of these licenses, and thus require inclusion of these licenses. The licenses of the figures are given in the list of figures on page 125. This PDF was generated by the LATEX typesetting software. The LATEX source code is included as an attachment (source.7z.txt) in this PDF file. To extract the source from the PDF file, you can use the pdfdetach tool including in the poppler suite, or the http://www. pdflabs.com/tools/pdftk-the-pdf-toolkit/ utility. Some PDF viewers may also let you save the attachment to a file. After extracting it from the PDF file you have to rename it to source.7z. To uncompress the resulting archive we recommend the use of http://www.7-zip.org/. The LATEX source itself was generated by a program written by Dirk Hünniger, which is freely available under an open source license from http://de.wikibooks.org/wiki/Benutzer:Dirk_Huenniger/wb2pdf. Contents 0.1 Foreword ..................................... 1 0.2 Reader Comments ................................ 1 0.3 Guide to Writers ................................. 1 1 What is P2P ? 3 1.1 From a Computer Science Perspective ..................... 4 1.2 From a Economics Perspective ......................... 10 1.3 From a Sociological Perspective ......................... 13 1.4 From a Legal Perspective ............................ 16 1.5 Shadow play .................................... 26 2 P2P Networks and Protocols 35 2.1 P2P and the Internet: A "bit"of History .................... 35 2.2 FIDO net ..................................... 36 2.3 eMail ........................................ 36 2.4 Usenet ....................................... 36 2.5 FTP ........................................ 37 2.6 Zero configuration networking .......................... 37 2.7 Internet Relay Chat (IRC) ............................ 38 2.8 Instant Messaging ................................ 42 2.9 VoIP ........................................ 43 2.10 Napster ...................................... 43 2.11 Gnutella ...................................... 44 2.12 Ares Network ................................... 52 2.13 Direct Connect .................................. 53 2.14 eDonkey ...................................... 54 2.15 BitTorrent ..................................... 57 2.16 Other Software Implementations ........................ 71 3 Building a P2P System 79 3.1 Developer ..................................... 79 3.2 The Peer ...................................... 83 3.3 P2P Networks Topology ............................. 85 3.4 P2P Networks Traffic ............................... 89 3.5 Unique ID ..................................... 99 3.6 Hashes, Cryptography and Compression . 100 3.7 Resources (Content, other) . 107 3.8 Services ...................................... 111 4 External Links 121 III Foreword 5 Contributors 123 List of Figures 125 6 Licenses 129 6.1 GNU GENERAL PUBLIC LICENSE . 129 6.2 GNU Free Documentation License . 130 6.3 GNU Lesser General Public License . 131 0.1 Foreword This book intends to explain to you the overall utilization that P2P (Peer-to-Peer) tech- nologies have in today's world, it goes deeper into as many implementations as it can and compares the benefits, problems even legal implications and changes to social behaviors and economic infrastructures. We explain in detail about the technology and how works and try to bring you a vision on what to expect in the future. The book is organized into different parts, but as this is a work that is always evolving, things may be missing or just not where they should be, you are free to become a writer and contribute to fix things up... 0.2 Reader Comments If you have comments about the technical accuracy, content, or organization of this docu- ment, please tell us (e.g. by using the "discussion" pages or by email). Be sure to include the section or the part title of the document with your comments and the date of your copy of the book. If you are really convinced of your point, information or correction then become a writer (at Wikibooks) and do it, it can always be rolled back if someone disagrees. 0.3 Guide to Writers Authors/Contributors should register if intending to make non-anonymous contributions to the book (this will give more value and relevance to your opinions and views on the evolution of the work and enable others to talk to you) and try to follow the structure. If you have major ideas or big changes use the discussion area; as a rule just go with the flow. Conventions A set of conventions1 have been adopted on the creation of this book please read about them before you contribute any content on the book's talk page2. 1 http://en.wikibooks.org/wiki/The%20World%20of%20Peer-to-Peer%20%28P2P%29% 2FConventions 2 http://en.wikibooks.org/wiki/Talk%3AThe%20World%20of%20Peer-to-Peer%20%28P2P%29 1 Contents The following people are authors to this book: Panica You can verify who has contributed to this book by examining the history logs at Wik- ibooks (http://en.wikibooks.org/). Acknowledgment is given for using some contents from other works like Wikipediab, theinfobox:Peer to Peerc and Internet Technologiesd, as from the authors . The above authors release their work under the following license: This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. In short: you are free to share and to make derivatives of this work under the conditions that you appropriately attribute it, and that you only distribute it under the same, similar or a compatible license. Any of the above conditions can be waived if you get permission from the copyright holder. Unless otherwise noted, used in this book have their own copyright, may use different licenses than the one used here, and were not created by the above authors. The authors, contributors, and licenses used should be acknowledged separately. a http://en.wikibooks.org/wiki/User%3APanic2k4 b http://en.wikipedia.org/wiki/ c http://www.theinfobox.com/index.php/Peer_to_Peer d http://en.wikibooks.org/wiki/Internet%20Technologies 3 3 http://en.wikibooks.org/wiki/Category%3A 2 1 What is P2P ? Figure 1 This is a diagram of a Peer-to-Peer computer network. Figure 2 A diagram of a server-based computer network. Generally, a peer-to-peer (or P2P) computer network refers to any network that does not have fixed clients and servers, but a number of autonomous peer nodes that function as both clients and servers to the other nodes on the network. This model of network arrangement is contrasted with the client-server model (that was unable to scale up to todays necessities). In the P2P model any node should be able to initiate or complete any supported transaction. Peer nodes may differ in local configuration, processing speed, network bandwidth, and storage quantity. This is the basic definition any p2p system. 3 What is P2P ? The term P2P may mean different thing to different people in different contexts. For instance, although the term has been applied to Usenet and IRC in all their incarnations and is even applicable to the network of IP hosts known as the Internet, it is most often used restricted to the networks of peers developed starting in the late 1990s characterized by transmission of data upon the receiver's request instead of the sender's. Such early networks included Gnutella, FastTrack, and the now-defunct Napster which all provide facilities for free (and somewhat anonymous) file transfer between personal computers connected in a dynamic and unreliable way to a network in order to work collectively towards a shared objective. Even those early Networks did work around the same concept or implementation. In some Networks, such as Napster, OpenNap or IRC, the client-server structure is used for some tasks (e.g. searching) and a peer-to-peer structure for others, and even that is not consistent in each. Networks such as Gnutella or Freenet, use a peer-to-peer structure for all purposes and are sometimes referred to as true peer-to-peer networks, even though some of the last evolution are now making them into a hybrid approach were each peer is not equal in its functions. When the term peer-to-peer was used to describe the Napster network, it implied that the peer protocol nature was important, but in reality the great achievement of Napster was the empowerment of the peers (ie, the fringes of the network). The peer protocol was just a common way to achieve this. So the best approach will be to define peer-to-peer, not as a set of strict definitions but to extend it to a definition of a technical/social/cultural movement, that attempts to provide a decentralized, dynamic and self regulated structure (in direct opposition to the old model o central control or server-client model, that failed to scale up to today's expectations), with the objective of providing content and services. In this way a computer programs/protocol that attempts to escape the need to use a central servers/repository and aims to empower or provide a similar level of service/access to a collection of similar computers can be referred to as being a P2P implementation, and it will be in fact enabling everyone to be a creator/provider, not only a consumer.