What is a peer-to-peer network in a computer. How a peer-to-peer network works


What to do if the corporate website of the company from which you wanted to download the file is closed along with the company, links to file storages are not working, and your friends and acquaintances have no idea what you need? The search engine gives a dull answer - nothing was found, and even a search on foreign sites did not give anything? It's time to plunge into a new section of the Internet, which has always existed in the mysterious world of hackers, but which you have not yet encountered.

Peer-to-peer networks are a brilliant illustration of the invulnerability of the Internet, which should have worked even when half the country was covered by a massive nuclear strike. These networks are decentralized, so the exchange of information will continue as long as there are at least two computers with an intact communication channel.

Majority ordinary users do not encounter peer-to-peer networks, even working with the Internet for several years. There are two reasons for this: the first is that working with them is accompanied by apparent complexity (but only apparent). The second is related to the almost complete lack of control of these networks, with all the ensuing consequences. The contents of networks are not indexed by conventional search engines and it is very difficult to eliminate a file that even violates someone's rights. You can stop the activities of one, two, three - at least a dozen network members, but the remaining users will be able to provide this information. Like a nuclear strike.

Peer-to-peer, peer-to-peer or decentralized networks (from the English peer-to-peer, P2P - one on one, face to face) are computer networks that do not have dedicated servers. All participants are equal, and each user computer(node, peer) both receives and sends information. This is very important point- we are used to working with servers on which the files we need are available around the clock, at any time. Because the servers are on all the time, it would never occur to anyone to turn them off during the lunch break. However, as we already know, in the same file storages - in the case of their free use, a lot of restrictions await us - download speed, amount of traffic per day, etc.). In peer-to-peer networks, we can provide the content of our hard drive or separate folder to everyone, in exchange for the contents of their folders.

The first thought that comes to mind after getting acquainted with P2P networks sounds something like this: if we give files to each other, does this mean that I have to be online around the clock? No, that's not entirely true. Let's imagine that you have taken an excellent photo of your city from a high-rise building. An excellent picture, excellent quality, occupying a size of 20 MB. It is clear that the file is completely unique and there is no other like it. You upload it to a folder accessible to everyone and another user starts downloading it. After the download is complete, it also uploads your photo to all users. As a result, there are already two sources on the net offering your file. A third user who logs on to the network will see that this file is in two places. He will already receive it in parts from two sources at once. As a result, the download speed will double. For the fourth participant, the file will be available from three sources, for the fifth - from four, and so on. If this file is in 5-10 sources, then it is clear that if one of the users decides to go to sleep and turns off his computer, then the number of available sources will simply become less by one. The download speed will decrease a little, that's all. The ability to download the same file from many computers at the same time is a great feature of the peer-to-peer network.

How are files defined? Can't your "My Favorite City.tiff" file (20 MB) be the same as another photographer who also named his work "My Favorite City.tiff" and which is also exactly 20 MB? Won't it turn out that users downloading this picture from two sources at the same time will end up with a non-working hodgepodge as a result? No, such situations are excluded. The fact is that when uploading a file to the network, it receives a unique hash code that determines given file absolutely right. Miscellaneous files, which have exactly the same names and even sizes, will receive different hash codes and will never get mixed up. However, the same file located on different computers will have the same hash code and will be issued from multiple sources.

There are many peer-to-peer networks (http://ru.wikipedia.org/wiki/Peer-to-peer_network). Perhaps the largest and most popular are eDonkey and Kademlia. These are partially decentralized or hybrid networks in which part of the coordination functions are processed special servers. But the materials are still stored on users' computers. Designed to work with these networks special program eMule (http://www.emule-project.net/). Download the program (~ 3.2 MB) using a regular browser, install and start configuring it. The whole process is accompanied by a master, so it is difficult to make a mistake in anything. Specify the name of your computer - under this name it will be displayed on the network (Fig. 9.14):

Rice. 9.14. Setting the computer name

It is desirable to specify this name together with the language, for example, chk (rus). The fact is that without this you may not be allowed on some Russian servers. However, the name can be easily changed in the program settings. In the next step of the wizard, we are invited to check the operation of the default ports (Fig. 9.15):

Rice. 9.15. Checking ports

In the vast majority of cases, everything will work by default - if our ISP does not block anything. However, we click on the "Test ports" button and we find ourselves on the program's website, where the result of a successful test is displayed (Fig. 9.16):

Rice. 9.16. Successful port testing

Next, we have to agree to the file priority policy. Its idea is to download files with a small number of sources independently of downloading popular files. In a word, we agree with the marked checkboxes and click on the "Next" button (Fig. 9.17):

Rice. 9.17. Priority setting

Veiling (from the word "veil") the operation of the application will bypass the restrictions that may be imposed by your provider. Let's try to work without this veiling (Fig. 9.18):

Rice. 9.18. Setting Veiling

By default, eMule offers to work with two peer-to-peer networks at once - eDonkey (eD2K) and Kademlia (Kad). Let's leave this setting unchanged - the more networks, the more available files(Fig. 9.19):

Rice. 9.19. Choice of Peer-to-Peer Networks

That's it, setup is complete. The wizard once again reminds you that all entered values ​​are available for changes during work in the program settings (Fig. 9.20):

Rice. 9.20. Completing the Wizard

The last thing left for us to do is specify the bandwidth of our line. Choose correct value from the list (Fig. 9.21):

Rice. 9.21. Choice bandwidth channel

This step is very important because eMule takes into account the configurable and actual connection speeds. If you do not know what your speed is, then use one of the sites that allow you to determine it (see lecture 4).

Let's start downloading files. Click on the "Search" button, enter the name that we need to find, for example " ubuntu linux", press the "Start" button. The search results are displayed in the program window (Fig. 9.22):

Rice. 9.22. searching results

Note that the "Type" drop-down list is designed to set the search filter by content - video, image, music, etc.

Here we see iso image files. Such files can be mounted on a virtual drive, for example, using the program Alcohol 120% (http://www.alcohol-soft.com/). For us, however, this is not the point - all we want is to download it. In the field "Availability" we see different meanings 1 to 22. This is the number of users who have the file or the number of sources. We remember that the more sources, the more speed downloads. Therefore, you should try to select files for which at least 5-6 sources are indicated. The "Full Sources" field indicates the completeness of the file. If all 5 computers have a full version of one file, then the value will be 100%. This circumstance should also be taken into account.

We allocate desired line, click on it right click and select the menu item "Receive" (Fig. 9.23):

Rice. 9.23. Starting a file download

We click on the "Transfer" button and see that the download has not started, nothing happens (Fig. 9.24):

Rice. 9.24. File upload start

This is where most users who encounter eMule begin to think that something is not working for them, after which they close the program and lose any interest in peer-to-peer networks. The fact is that during the usual download of files - especially at a good speed, we are used to the fact that the download starts instantly. If it does not start, then something is not working. But in peer-to-peer networks, the principle "You to me - I to you" applies. The more materials we send to the network, the higher our rating, the faster we start downloading. Do you remember? Materials are stored in conventional computers users who are connected to the Internet by a conventional communication channel, and not by a dedicated multi-megabit line, as in the case of data centers. Therefore, if ten people want to download one file, then they will queue up. They let the "oldies" go ahead, who themselves have already been useful, that is, they have provided some interesting files. We'll have to wait a bit. How many? It depends on the relevance of the file, the number of sources, in a word, many parameters. However, in most cases, the download will begin after a reasonable amount of time. For example, in this case in less than 10 minutes, the download began (Fig. 9.25):

Rice. 9.25. File started uploading

In the screenshot, we see that three sources began to give this file at once. The speed is small - about 10 Kbps, but this maximum speed my channel. Peer-to-peer networks are not to blame, neither is eMule. On a larger connection, the speed will be correspondingly higher.

The most amazing thing is that having downloaded even a small part of the file, we immediately become its source. Other users can already connect to our machine and get very small pieces. Click on the "Statistics" button and see the graph of receiving and returning in real time (Fig. 9.26):

Rice. 9.26. file sharing statistics

In order to increase our rating, move faster in the queue and receive files simultaneously from many sources, we also need to offer something interesting to other users. Click on the "Files" button and see the explorer of our computer. The main mistake of all beginners is that they open access (share) their entire disk (Fig. 9.27):

Rice. 9.27. Incorrect access to the entire disk

Users do not need the content of our Windows folders and Program Files. As well as personal documents. Therefore, for the correct opening of access, we create special folder, put in it required files and right-click, selecting the menu item "Exchange with subfolders" (Fig. 9.28):

Rice. 9.28. Opening access to a dedicated folder

If necessary, in the future we will close access to this folder in a similar way (Fig. 9.29):

Rice. 9.29. Closing access to a folder

Arises important question– and what prevents us from uploading files that do not correspond to their content? Give regular video clips sensational titles and place them in shared folder? The fact is that the very first few users will ban us or even blacklist us for the entire system. After that, we will not be able to download files at all. Therefore, you should not try to deceive users.

As we have already noted, a peer-to-peer network is able to completely occupy our communication channel. To prevent this from happening, you can set a limit for receiving and uploading files in the program settings (Fig. 9.30):

Rice. 9.30. Setting the connection limit

eMule has a built-in IRC Internet pager and a messaging system, sort of like mail. These tools allow individual users to agree on a privileged transfer of materials to each other. As usual, such an action is called "befriending", becoming a friend. However, privileged file sharing does not affect user ratings.

When starting to work with the eMule program, it is useful to read the help materials http://www.emule-project.net/home/perl/help.cgi?l=34.

Introduction…………………………………………………………………………...…3

Chapter 1

      General concept …………………………………………………………………………. ...................…4

      Peer-to-peer network .................................................................. .........................7

      Peer-to-peer file-sharing network ………………………...………..9

Chapter 2. Networks and protocols (on the example of eDonkey2000)………………………..10

      eDonkey2000 (web)……….……………………………………..….10

Conclusion …………………………………………………….………………...13

References…………………………………………….………………...15

Electronic resources…………………………………………………………...16

Introduction

We all share information with the people around us in some way. In the case when we share files using programs like eMule( emul), eDonkey(eDonki), and the like, this kind of exchange is associated with the work of a huge machine, the principles of which, its origins and the ideas on which it is built, we often imagine rather poorly.

The need to have access to a huge amount of information lying on other computers first gave rise to local networks. This helped for a while, but it turned out to be impossible to combine a large number of computers in this way. The possibility of accessing files that someone else might have was very tempting. Therefore, a system was proposed that allows you to receive and transfer files from each computer with which there is a connection and which has a certain software. Such systems are called p2p (p2p) or peer-to-peer (peer-to-peer) networks. This phrase can be translated as "equal exchange". This means that you, having some files that may be of interest to someone else, allow those who wish to copy them from you, and in return you get the opportunity to receive the files you need from those who have them.

Since the Internet is now becoming more and more widespread, the use of peer-to-peer networks is more relevant every day. Indeed, today find the desired file (favorite movie, new program for your "electronic friend", a song of your favorite star that has just been released, a book and just any file you are interested in) is much easier if you know what peer-to-peer networks are and know how to use them.

Chapter 1 Peer-to-Peer Networks

1.1. General concept

One of the main difficulties in implementing such an exchange was that it was necessary to somehow find those who have what you need. To solve this problem, there are two main ways: centralized and distributed servers. In the case of working with a centralized server, each user must register on this server, which will collect information about the user (files available for exchange, user ID, etc.), and then enter this information into its database, according to which it will be further go search. All files requested by the user will be searched in the database of the central server, and the links found will be transmitted to the user to establish a direct connection with exactly the computer that has the necessary information. It is on this principle that the popular KaZaa and other peer-to-peer applications work. The described method of exchanging files using one or more central servers is based on the so-called FastTrack protocol, which is commercial, which somewhat negatively affects the development of applications that use it.

When a central server does not exist, the Gnutella protocol is used, which passes the user's request not to the central server, but directly to other computers on the network. The user is both a client and a peer-to-peer network server. Such systems are less demanding in terms of admission and registration of new members and are characterized by a huge speed of request propagation. The number of interviewed sources is increasing exponentially. An example of an application that uses this approach is Morpheus.

The undoubted pioneer of peer-to-peer systems was Napster (Napster), who fell under the hot hand of copyright defenders. A few months after the appearance of Napster, IMesh saw the light. Unlike Napster, IMesh is still alive today.

After the demise of Napster, peer-to-peer applications began to appear at a monstrous rate, and by now there are quite a few of them. Periodically, some die, others are born and reborn. One of the most famous in the world is KaZa, and in Runet there are varieties of eMule and eDonkey.

In fact, the donkey and the mule, as those who use them call them, are in a sense intermediate systems between distributed and centralized systems: there are central servers that process user requests (donkey and mule breeders, respectively), but there are a lot of such servers , which allows, on the one hand, not to overload them, but on the other hand, it somewhat complicates the search, since updating and obtaining information from other servers takes some time.

As in any community, there are some rules of conduct and good manners for those who use peer-to-peer networks. They are simple and obvious, but, unfortunately, not always and not by everyone.

1. After downloading, do not delete the file immediately. While there is an opportunity - hold it and let others download it.2. Do not clamp the speed of the outgoing connection unnecessarily. Of course, this is a load on your computer, but then others also want to get something.3. Share files. If you have something that might be of interest to someone else.

The future of peer-to-peer networks as a whole looks pretty bright. The passion of people for the exchange (free) is indestructible. Companies' passion for making money is also indestructible. It turns out a classic case: the unity and struggle of opposites. There is nothing illegal in the networks themselves. They will continue to build. And how the fight against piracy of materials will be conducted, time will tell.

Separately, there is the issue of copyright when using peer-to-peer networks. Strictly speaking, distributing licensed products in this way violates the copyrights of those who own them, and discussions on this topic have long become a permanent background in which files are transferred and received anyway. From the point of view of copyright defenders, peer-to-peer technologies can be successfully used in projects that do not directly affect their interests and do not compete with paid online services (for example, to create communities of people interested in problems such as finding cures for cancer). Another interesting application of these technologies is the creation of efficient search engines (on this problem, in particular, the late Jin Kang worked).

The idea of ​​shareware and at the same time legal distribution of completely commercial content also has a right to exist. Perhaps the main argument of the advocates of peer-to-peer exchange is the fact that there is no reliable connection between the quantitative growth of file sharing and the decrease in official income from the sale of content (music on CDs, video on DVD, etc.). The RIAA data on the decline in industry revenues in this regard is explained by the unfavorable general economic situation and the media giants' slowness in bringing new products to the market. Moreover, the lion's share of those who listen to MP3 music downloaded on the Internet subsequently buy the albums they like on CD for their better quality.

1.2 Peer-to-peer network

Peer-to-peer, decentralized or peer-to-peer (from English peer-to-peer, P2P - one on one, face to face) networks are computer networks based on the equality of participants. In such networks, there are no dedicated servers, and each node (peer) is both a client and a server. Unlike the client-server architecture, such an organization allows the network to remain operational with any number and any combination of available nodes.

The phrase "peer-to-peer" was first used in 1984 by Parbawell Yohnuhuitsman when developing IBM's Advanced Peer to Peer Networking architecture.

Peer-to-peer device

For example, there are 12 machines on the network, and any one can communicate with any. As a client (consumer of resources), each of these machines can send requests for the provision of any resources to other machines within this network and receive them. As a server, each machine must process requests from other machines on the network, send out what was requested, and perform some support and administrative functions.

Any member of this network does not guarantee to anyone his presence on permanent basis. It can appear and disappear at any time. But when a certain critical network size is reached, there comes a moment when there are many servers with the same functions in the network at the same time

In addition to pure P2P networks, there are also "hybrid networks" in which there are servers used to coordinate work, search or provide information about existing network machines and their status (on-line, off-line, etc.). Hybrid networks combine the speed of centralized networks and the reliability of decentralized ones thanks to hybrid schemes with independent indexing servers that synchronize information with each other. If one or more servers fail, the network continues to function. Partially decentralized file-sharing networks include, for example, EDonkey, BitTorrent.

Partially decentralized (hybrid) networks

In addition to pure P2P networks, there are so-called hybrid networks in which there are servers used to coordinate work, search or provide information about existing network machines and their status (on-line, off-line, etc.). Hybrid networks combine the speed of centralized networks and the reliability of decentralized ones thanks to hybrid schemes with independent indexing servers that synchronize information with each other. If one or more servers fail, the network continues to function. Partially decentralized file-sharing networks include, for example, EDonkey, BitTorrent.

1.3 Peer-to-peer file sharing network

One of the areas of application of peer-to-peer networks technology is file exchange: network users upload any files to a “shared” (English share) folder, files from which are available for download to other clients. Another network user sends a request to search for a file. The program searches network clients for files matching the request and displays the result. After that, the user can download files from the found sources. Modern file-sharing networks allow you to download one file from several sources at once (it's faster and more reliable). To make sure that this file is the same for all sources, a comparison is made: by file name, by checksums or hashes like MD4, TTH, SHA-1. While a user is downloading a file (and after it is finished), other network clients can also download this file from him, as a result of which especially popular files can eventually be available for download from hundreds of sources at the same time.

Typically, such networks exchange films and music, which is the eternal headache of video publishing and sound recording companies, which are very unhappy with this state of affairs. Adding problems to them is the fact that it is technically impossible to stop the distribution of a file in a decentralized peer-to-peer network - this will require physically disconnecting all the machines on which this file is located from the network, and there can be very, very many such machines - depending on the popularity of the file. IN Lately video publishers and record companies began to sue individual users of such networks, accusing them of illegal distribution of music and video.

Chapter 2. Networks and protocols (on the example of eDonkey2000)

2.1 eDonkey2000 (web)

eDonkey2000, eDonkey, eD2k - file sharing network built on the principle P2P based network protocol applied level MFTP. Common in Runet informal names: "donkey", "donkey".

The network consists of several million clients and several dozen servers interacting with each other. Clients are users who upload files and users who have full versions of files "full sources". Servers allow you to find published files and other users who have these files (in whole or in part). The files themselves do not pass through the servers.

Each client is connected to one of the network servers. The client tells the server which files it provides in general access. Each server maintains a list of all the shared files of the clients connected to it. When a client searches for something, it sends a search request to its main server. In response, the server checks all the files it knows and returns to the client a list of files that match its request.

You can search across multiple servers at once. Such requests and their results are transmitted through the protocol UDP to reduce the channel load and the number of connections to the servers. This feature is especially useful if a search on the server to which the client is currently connected returns a low result.

When a client requests a file to be downloaded, the server first collects a list of all clients known to it that have the requested file. It then asks other known servers to see if clients connected to them have the file. Once it finds other clients with the file, then the server asks each client for different parts of the file. This process continues until the entire file is built.

How it works: Client Z has all parts of a File (lower case characters represent parts of a file). Client W, X, and Y want to download a File. Since Client X and Client Y both have different parts of the File, they can not only receive a file from Client Z, but they can also send a file to each other. This allows the file to be distributed much faster without using more Client Z bandwidth. Client W can start downloading the file even if the file source (Client Z) no longer has enough bandwidth to send.

Periodically, the servers communicate with each other for a short time. During this session, the server, announcing its existence, sends a list of all other servers known to it. Thus, the servers maintain a list of other active servers. When a client connects to a server, the server can give it a list of known servers.

Popular file sharing networks:

    ED2K she is eDonkey2000- a network of a centralized type, the largest of the currently existing file-sharing networks. The search is performed by specialized servers interconnected. Clients independently exchange according to the protocol MFTP. Company MetaMachine the developers of the original concept and the first web-based client (Edonkey 2000 v1.4.5) stopped supporting this project in 2005, but the web continues to function with a better and more powerful client eMule which uses mechanisms Kademlia to build a decentralized eD2k segment.

BitTorrent (lit. English"bit stream") - peer-to-peer (P2P) Cohen's network protocol for cooperative file sharing over the Internet.

No less popular file-sharing network. Files are transferred in parts, each torrent client, receiving (downloading) these parts, at the same time gives (uploads) them to other clients, which reduces the load and dependence on each source client and provides data redundancy. Is different high speed and centralization. Some BitTorrent clients support DHT and can work without a central server (the so-called tracker). Supported by clients BitComet, µTorrent, FreeDownloadManager, etc.

Kad Network - decentralized serverless file sharing network, which uses the protocol overlay network Kademlia. Supported in eMule(Kad 2.0), aMule And MLDonkey. When transferring files, client connections are made directly to each other (using standard IP networks). As soon as a connection to the network occurs, the client queries other clients to determine if it can freely connect to them. This process is similar to determining HighID/LowID on servers. If you can freely connect, you are given an ID (high, HighID) and receive an open status in the Cad network. If you can't connect freely, you get the status firewalled (respectively LowID).

Conclusion

The emergence of peer-to-peer networks is associated with three factors.

    The processor of a typical client machine is underutilized. Especially in offices where machines are mainly used for document preparation, typing, etc. The same goes for the vast majority of home computers.

    Many users store collections of files on their computers (texts of articles on certain topics, artistic photographs, etc.) that may be of interest to other users. But at the same time, the owners of these collections are not ready to make their computer a full-fledged server on the network due to its insufficient capacity, the need for round-the-clock work, financial and other reasons.

    A certain part of users would like to participate more actively in the "public life" of the network, not limited to discussing various issues on forums and chats. They are ready to participate in some useful "common cause".

Peer-to-peer networks are diverse. The main purpose of some is the exchange of music and video files. Others are implementing projects to find a cure for cancer, others are training in breaking known ciphers based on distributed computing, and others are looking for extraterrestrial civilizations based on data received from radio telescopes.

From a mathematical point of view, a peer-to-peer network can be represented by an indefinite graph: there is no standard network architecture (for example, stars or rings). Moreover, this graph is dynamic, as individual users join and leave the network at random times. Any user playing the role of a server at any time can turn into a client for a certain period of time. But it can also be in the position of both the server and the client at the same time.

Research into peer-to-peer networks began with the successful operation of such systems as Napster, Gnutella and Freenet.

Napster is a hybrid system because it uses a centralized search index. The Gnutella system is a pure peer-to-peer system. Its architecture is such that each node with low switching speeds can have up to four neighbors, while powerful nodes can have dozens of neighbors. It is clear that the more neighbors, the faster the search can be. But here there are the same technical limitations as in multiprocessor computers: it is too expensive to connect each to each. Connections in the system are not directed (undirected graph). The Gnutella system uses breadth-first search by first looking at all nodes adjacent to the initiator. Each node that receives a request propagates it to its neighbors for a maximum of d steps.

The advantage of breadth-first search is that by scanning a significant portion of the network, it increases the likelihood of satisfying a query. The disadvantage is that the network is overloaded with unnecessary messages.

Most existing systems only support "boolean" queries. Each file is characterized by its metadata (for example, a set of keywords) and the query is formed as a set of keywords. As a result, the search result can be two-variant: "found", "not found".

Bibliography

A peer-to-peer network, it is also peer-to-peer, it is also decentralized, it is also peer-to-peer (“equal to equal”), it is also P2P, it is a computer network without control servers. Well, or almost without them - a hybrid that combines the advantages different technologies. One way or another, users' computers connect directly to each other and communicate really on an equal footing. However, as always, we will talk about everything in order.

essence

For comparison, consider the operation of a conventional network, for example, the World Wide Web (World wide web). Websites are hosted on servers. Clients connect to these servers and request published web pages and other files. That is, there must be a computer that hosts a particular resource with a specific domain name bound to a specific IP address.

Now imagine that every computer on the network becomes a kind of server - you can take data from it. But at the same time it remains a client - it requests everything that the user needs. And this or that file does not exist at a specific address, as on the World Wide Web, but for everyone who is not too lazy to make copies. Information is not stored in one place, but distributed among equal participants.

If there is a shutdown or server failure on the World Wide Web, then you can’t go to the site, you won’t be able to download anything from there. However, in a peer-to-peer network, what is published has a good chance of remaining available.

One of the owners of a copy of the file fell offline - let's take it from another. Maybe he already downloaded the third one for himself - then we'll get it from him. And then we ourselves will allow everyone to copy what they have received.

torrents

Naturally, when it comes to peer-to-peer networks, torrents immediately come to mind. Tracker sites are mistakenly considered to be their centers. But these are just repositories of connection settings.

The user receives the above parameters (in the form of a torrent file), enters the peer-to-peer network - and starts downloading the file piece by piece, without interacting with the tracker in any way. Moreover, it simultaneously serves as a server, giving the received pieces to other downloaders.

Such a system has disadvantages. To be able to get a file, someone has to distribute it. That is, the owner full file(and not pieces) must be online. It is called the "seeder".

Who managed to download the file completely, can immediately become such a "sower". Did not have time? So, for now, he is just one of the “peers” (peer) exchanging file fragments. And the more participants, the faster these pieces add up into a single whole.

If all the owners of the complete file are offline, then no one will download anything, alas.

Torrent technology works without problems in local network(for example, in the provider's network), without access to the Internet. Of course, if there is something to exchange.

Skype

Yes, the Skype network is also peer-to-peer. However, not in its pure form, since there is still a coordination server.

When a client wants to call someone, then main server issues encryption keys to establish a secure connection. Then, as they say, he washes his hands. Further, the data exchange takes place directly, from computer to computer. (The connected machines are called nodes, from the English "node" - "node".)

In general, one local network is not enough, because the connection stage requires access to the Internet.

Skype's central server also stores customer data. Contact lists, account balances (to pay for calls to regular phones), usernames and passwords.

Online skype computer can suddenly, without asking permission and without warning, become a supernode - a supernode. And pump other people's data, helping someone to communicate.

However, if your traffic exchange rate is not very high, then you most likely will not face such a fate.

Computing networks

“Why build a huge supercomputer when you can build it from a great many ordinary ones?” - this is what the cunning developers from Sony thought, launching their gaming consoles. - "Let the Sony Playstation unite in a peer-to-peer network!"

Why peer-to-peer? Because for the usual one you need a server that will very quickly fall into a stupor due to the crazy load. And when using a peer-to-peer structure, each participant processes a part of the circulating data, and the load is distributed among all.

Finance

The creator did the same payment system Bitcoin - took it and founded a peer-to-peer network in which information about transactions is stored by each of the users. This distribution of information guarantees the safety of all data and the operability of the system even after turning off most of the computers.

However, reliability is purely technological, there are no other guarantees. Everything rests on the enthusiasm of the participants and the favor of online stores that accept payments in the virtual currency Bitcoin.

Another drawback: swelling copies of the database with information about transactions. One way or another, but you have to pay for everything.

Safety

The Skype network is safe as long as you don't accept or run any files from people you don't know well. The data is encrypted, so no one can eavesdrop on your conversations, no matter how many computers in the peer-to-peer network they are pumped through.

It is better to connect to torrents while working in UNIX-like operating systems. On Mac OS, GNU/Linux, *BSD.

Well, if you use Windows, then at least do not download pirated copies of programs, since all this is provided for sure to the infected.

Peer-to-peer networking requires software ports to be open for incoming connections. Network worms and other infections like this very much, so the antivirus must be good and with fresh databases.

Summarizing

If no one distributes the file in torrents, then it can probably be found and downloaded in the usual way With regular server, By FTP protocols or http. (We are talking, of course, only about legal downloads.) For example, such alternatives are almost always provided for those who want to get one or another distribution of GNU/Linux.

If there is no possibility or desire to use Skype, then, for example, only ICQ can be dispensed with (although there, when transferring files, a direct connection between computers is also established). And participation in the Bitcoin system is completely voluntary.

In general, peer-to-peer networks are convenient and often even very useful, but there is no vital need for them.

They attract freedom-loving people who like decentralization and even some anarchy, but all these advantages are nothing more than an illusion. Why? For one simple reason: each user is entirely dependent on the provider. And a completely independent network, one's own and not controlled by anyone, can be organized only on a very modest scale.

Previous publications:

As an example, the current engine allows you to add services such as:

  • blogs
  • photo albums
  • music and video playlists
Each section has its own title, description, background picture, icon. Additionally, you can set the minimum access rights to add child elements for the current section.

The site, in accordance with the latest trends, has an adaptive design and is displayed and edited quite correctly on mobile devices.

Please, dear community, do not criticize too much appearance site and the current site engine, since it was created solely as a demonstration of the system's capabilities and so far, of course, has a number of some problems with layout and usability. In not so distant plans is the refinement of this engine and bringing to mind the functionality of the site.

Perhaps some developers will be interested in participating in this project- bring new features, expand functionality, add features or improve the design of an existing engine. Welcome! I would greatly appreciate any help.

Project infrastructure

Server software installation

To support the project and develop the network, anyone can provide their server resources. To do this, you need to install and run a server node on your server.
  1. Before installing the node, you need to make sure that the Node.js platform is already installed on the server or install it according to the instructions
  2. Download repository from github

    Git clone https://github.com/basenetwork/base.server-node

  3. Install sqlite3 module for Node.js

    cd base.server-node && npm install sqlite3 --build-from-source && cd ..

  4. run node nohup base.server-node/base.node.js --size=32 >/var/log/base.node.log &
As the size parameter, you must specify the free disk space (in GB) that you are ready to allocate for the node.
For the node to work, it is necessary to allocate an external IP address and a free port. By default, the system will automatically try to use one of the external IP addresses in the operating system's network interfaces list. It is possible to manually specify the IP address and port using the --host and --port startup options:

Nohup base.server-node/base.node.js --size=32 --host=41.34.55.66 --port=2222 >/var/log/base.node.log &
You can check the performance of the node by making an http request to the web server:

Curl http://41.34.55.66:2222/-/about

Source

All project sources can be found on GitHub - github.com/basenetwork . The account contains several repositories:
  • base.server-node
    Actually, the server node itself. The repository is written in Node.js. Instructions for installing a base node on your server were presented above.
  • client-js
    client core. The project is written in JavaScript. Includes basic functions for working with the system. This is directly the same code that is loaded when opening any system site - http://base.network/core.js The core provides a special API for site engines to work with the network - baseAPI
  • site-engine-js
    Website engine. Written in JavaScript using the React.js library. It uses Bootstrap v3 as a layout and styling framework. This is actually the code that organizes the structure of sites, their external representation. Implements a content editing system for site owners. IN this moment as a test, the engine implemented such services as blogs, photo albums and media lists, as well as a comment system for posts and photos. The engine does not work directly with the network, but uses an API specially provided by the core for this.
  • static builder
    Specially designed static files builder. The builder is written in Node.js. The builder's job is to compile all the static files into one single javascript file. Required to compile the core and site engine. The compiled file includes all the functionality for working with the site: programming code, logic, forms, styles, fonts and icons used in the design of the site. The resulting file is uploaded to the network and loaded by the user as an engine one single time, when visiting the site.
    The builder inserts base64-encoded content directly in css-style files instead of links to fonts and icons. And already received css-files, as well as compiled js and jsx, are combined into one single js-file.
Unfortunately, detailed documentation on the project has not yet been created. No detailed description structures of repositories and exchange protocols. The functionality is not covered by tests (the source code is presented in a very raw form for review). I hope that the situation will be corrected in the near future.

Plans

  • Improve site engine. Redesign and improve the usability of existing functionality. Add Row useful features in order not to be inferior to modern social networks in terms of functionality.
  • Localize the web interface for popular languages.
  • Add secured private messaging service complete anonymity. The service, in addition to encrypting the message content itself, will hide the very fact of correspondence between two persons, which is difficult to achieve using centralized system. The implementation of such a service requires only minor modifications to the site engine on the client side. The server part is already quite ready to implement such functionality.
  • Rewrite the server software in the GO language, since the speed of working with cryptographic algorithms on Node.js leaves much to be desired.
  • Cover all functionality with tests.
  • Compile detailed documentation for the project, API and client-server communication protocols.
  • Create a kind of Store of site engines, services and plugins, as well as styles and design themes.

Project support

As you probably already noticed, the project is still in its infancy and it desperately needs your help. Anyone who is not indifferent to the principles of freedom of dissemination of information in modern world. Your advice, feedback and suggestions for improving the project are already a tangible help.

In addition, if you have servers at your disposal, or have a dedicated channel on your personal machines, you can provide a small part of your machine resources for network development. You can read the instructions for installing a server node above or on github . Your feedback on the operation of the installed server software will also be extremely important.
Web developers who own Node.js can offer their improvements and tips on optimizing the server software.

Web designers, HTML layout designers, programmers with experience in JavaScript can take part in the development of the site engine and its individual services. It is also welcome to develop your own website engine from scratch.

Thanks for support!

Conclusion

And finally, some lyrics. Censorship in the modern world is a big nonsense. Any ideas, no matter technical or humanitarian, develop in the same way  -  they grow one from the other, in an endless chain. An idea has the right to be expressed and heard in its original form without distortion or censorship. However, in modern realities, manuscripts burn quite well and what is written with a pen is mercilessly cut down with axes. And, no matter how sad it is to realize it, but conceived as a mouthpiece of freedom, the Internet in the hands of the governments of countries and states has become an instrument of all-encompassing control. Moreover, the control is so undisguised that more and more advanced part of society is asking the question: is there freedom of speech on the Internet? Can we use it to openly declare something really important? Do we see in its open spaces the whole palette of diverse independent opinions? Add tags
How to find and download any files on the Internet Reitman M.A.

How a peer-to-peer network works

How a peer-to-peer network works

The history of peer-to-peer networks began in the distant 1999. This year, the Napster project was launched, which was conceived as a worldwide file sharing database. And within a year, Napster had become the most popular brand on the Internet. This service was used by about 40 million users. AND main reason such popularity - using this network, users were given the opportunity to download music files for free. Naturally, copyright defenders did not like this course of events at all, and the project was closed. But, it was already too late. The precedent has been set.

Other similar projects were subjected to the same persecution. But the process got out of hand. And file-sharing peer-to-peer networks continued to exist, enjoying ever-increasing popularity among users. The reason for such survivability of peer-to-peer networks lies in the principle of their work. The operation of a peer-to-peer network is fundamentally different from networks built on the "client-server" principle. This network works on the principle of "client-client". That is, if you speak correctly, the technology is called Peer to Peer (P2P) - (peer) node (network) to (peer) node (network). Here, each user's computer acts both as a client and as a server.

The general principle of operation of such networks can be described as follows. The client program, after connecting to the network, sends to the network a list of files that the computer can provide for download by other client programs, and a list of files that the client program wants to receive from the network. Then there is a search for client programs that need the files offered for download, and client programs that have the files they are looking for. After that, a direct connection is established with these computers and, of course, with the client programs installed on these computers, and data is exchanged. All files are divided into many separate parts. And the client program that downloads the file of interest to its computer receives this file in parts from several computers at once. And often the donor computers that give you parts of the uploaded file are located in different parts of the world. It should be noted that your client program simultaneously not only receives parts of the file of interest, but immediately distributes the newly received parts to other interested client programs.

There are two models of peer-to-peer networks. These are centralized and decentralized networks. IN centralized networks the search for suitable partners for data exchange is carried out using a central server, and data exchange takes place after client machines a direct connection will be established.

If any nodes, i.e., client computers, simultaneously perform the functions of both a server and a client, then such networks are called decentralized. In such networks, a central server is not used to process requests and coordinate the work of client machines. Of course, centralized networks are faster than decentralized networks, but decentralized networks are more reliable because they can operate without coordinating servers.

As mentioned earlier, the copyright holders of music or video files are constantly trying to close and close file-sharing networks. But the example of the eDonkey2000 peer-to-peer network shows that it is impossible to close the peer-to-peer network. Officially, the protocol used by this peer-to-peer network belongs to MetaMachine. Due to lawsuits filed against this company, the eDonkey2000 peer-to-peer network was officially closed in 2007. But, no matter how strange it may sound, the closure of several dozen servers of this company had practically no effect on the operation of this peer-to-peer network. Why did this happen? The thing is that the tools of this company have ceased to be popular with users. Most users have switched to alternative software. And given that this network decentralized, i.e. the computer and the client program of each network user are both a client and a server, the network is out of control of MetaMachine. Therefore, the closure of several servers of this company did not affect the network at all. And the network will exist, no matter what, until it loses the last user.

For the smartest of you, the question immediately arises: how do other users on the Internet know that I am distributing a file? Quite naturally. Here they come to the rescue trackers - websites that publish information about the distributions launched by users. In addition to describing your " Linux distribution", you create and upload to the tracker a special torrent file containing all the data on how, what and where to download. Another user downloads this file (usually a couple of hundred kilobytes in size) to his computer, opens it in the associated client program and starts downloading it from you.

P2P networks have their own terminology. Naturally, the user who uploads the file to the network will have a different name than the user who consumes this file.

So, conditionally, all users can be divided into siders, peers And leechers.

sider or sid (from English. seeder or seed - sower or grain) is a user who has all parts of the file. This can be the user who started the distribution, or the user who downloaded the file completely and did not leave the network (began to distribute the file).

Feast (from English. peer - equal, accomplice) is a user who has not downloaded the entire file. But, downloading all parts of the file to his computer, this user simultaneously participates in the distribution, sharing with the rest of the network those parts of the file that he has already downloaded to his computer. In principle, a feast is any participant in the distribution.

Leecher (from English. lecher, which in turn comes from the word leech - leech) is a user who has just started downloading a file and has not had time to start distributing already received parts.

Let's return to the terminology adopted in peer-to-peer networks.

Availability - the number of complete copies of the file, available to the client. Each seed adds the value 1.0 to this number; leechers increase availability based on the amount of downloads that other leechers don't have. For example, if there is one seed and two leechers in the distribution that downloaded 50% of the file each (the downloaded parts are equal), then the availability is 1.50.

Roy (from English. swart - swarm) - all users (peers) and seeders participating in the distribution.

In the process of working with torrent files, downloading and distributing data, you will come across two more terms - announcement And DHT.

Announcement - the process of client contacting the tracker. With each announcement, the client program sends to the tracker information about the amount of downloaded and uploaded content, and the tracker sends the list of addresses of other clients to the client. The client contacts the tracker at certain time intervals, which are determined by the settings of the client and the tracker.

In a nutshell, then DHT (Distributed hash table - distributed hash table) is a protocol that allows client programs to find each other without the help of a tracker. The ability to work with these protocols can be either allowed or prohibited. It is easy to guess here that if DHT is prohibited for a certain torrent file, then it will be impossible to download the file without the appropriate rating level (if it is below the threshold value). If DHT is allowed, then, in fact, the rating on the tracker does not matter and the file will be available for download anyway. Here it is worth mentioning that without the required rating level, even with DHT allowed, you will not be able to access the addresses of all peers.

From the book 64 kilobytes about Fido author Filimonov Nick

How does it all work? Most of the time, the station is usually in the state of waiting for a call or event. Events are defined by the mailer event configuration. If it's time next event, the mailer launches defined by the operator processes (eg.

From the book Overclock your site author Matsievsky Nikolay

How it works? IN HTTP protocol version 1.1, introduced in 1999 and used to this day in world wide web, it became possible to make several requests to the web server within a single TCP connection. Considering that the pages of modern sites usually contain a large

From the book NetAMS Documentation author author unknown

How it works New features are focused on: support for authorization via telnet interface and/or command line rlm_netams module extending the FreeRADIUS server support for authorization of access to HTML pages via mod_auth_radius + new html service command (optional) As a server

From the book Working on the Internet author Makarsky Dmitry

How it works How it works Skype programs(Figure 5.10) is very simple. After downloading the application from the site http://www.skype.com and installing it on your computer, you can practically start communication. Rice. 5.10. Skype program windowIn many ways, working in Skype is similar to working with client programs

From the book On Intelligence [another version of the translation of the book] by Jeff Hawkins

6. How the Cortex Works Trying to understand how the brain works is like solving a giant jigsaw puzzle with pieces of a picture. You can approach it in two ways. With a top-down approach, you start by taking the whole picture and using it to

From AS/400 Fundamentals author Soltis Frank

How It All Works In this section, we'll continue talking about I/O using the SPD bus as an example. We will go into the details of the low-level operations performed below the IPCF, which are very specific to the SPD bus structure used in both old and new AS/400 models. To

From the book Wi-Fi. Wireless network by Ross John

From the SAP Business One book. We are building efficient business the author Elashkin Mikhail

CHAPTER 10 HOW DOES IT WORK? "Dear passengers! We are on board the new IL-186 super wide-body aircraft. Our plane is seven-deck. On the first deck there is a wardrobe and a storage room. On the second deck there is a cinema hall. On the third - the passenger compartment. On the fifth -

From the book PGP: Encoding and Encrypting Public Key Information. the author Levin Maxim

How PGP works. This will help you if you were already familiar with the concept of cryptography in general, and public key cryptography in particular. However, there are a few introductory notes about public-key cryptography. First, some terminology.

From Ubuntu 10 Quick Start Guide author Kolisnichenko D. N.

24.2.1. The network is down The cause of a network failure can be physical or software. Physical related to non-working network equipment or damage to the data transmission medium. Software - with incorrect setting network interface. Usually get rid of

From the book Internet Marketing 100% author Team of authors

2.3.3. How does it all work? BASICS OF THE FUNCTIONING OF SEARCH ENGINES, INDEXING AND RANKING OF SITES I would like to make a reservation right away: search system is a robot that automatically processes billions of pages according to some algorithm, as a result showing in shares

From the book Handbook of BIOS settings author Wong Adrian

From the book BIOS Optimization. Complete reference for all BIOS parameters and their settings author Wong Adrian

How does the BIOS work? Most people are not even aware of what is happening while working on a computer. It seems to them that the computer just responds to keystrokes and mouse clicks. The computer does what you tell it to. He doesn't ask questions. In fact,

From the book The Case of Copyright Reform author Engström Christian

It still doesn't work Death penalty for copying January 15 at 7:09 pm. Copyright: Peer-to-Peer* photo by Andrey Butko, under license creative commons Attribution-Share Alike 3.0 Unported. In today's world, the penalties for copyright infringement are quite severe. Astronomical numbers of fines and

From the book Operating UNIX system author Robachevsky Andrey M.

How it works? Essentially, the RPC system itself is built into client program and a server program. The good news is that when developing distributed applications, you do not have to delve into the details of the RPC protocol or program message processing. System

From the book Internet for Rusty Dummies author Levina Lyubov Trofimovna

How the Internet works All computers on the Internet can be roughly divided into two groups - servers and clients. Servers are powerful, reliable computers that work around the clock. They are constantly connected to the Internet, are able to store and send information over







2023 gtavrl.ru.