Perspective BT (4)──Why doesn't BT have a built-in search function?

After the first few articles of the BT series were published, the response was enthusiastic. It seems that everyone has heard of the title of BT, and has been downloaded more or less, but it seems that there is no very deep understanding of the impact of BT on various levels. Today. The topic to be discussed is obviously also the question that many users have for many years: Why does BT have no built-in search function ? Although the real answer may only be known to Bram Cohen, but here from the difficulty of P2P software design and website establishment, try Seek a reasonable explanation.

If you want to use P2P software to download files, no matter which program you use, the usual sequence of actions is:

Enter keywords -> find file information -> download

In the past, sharing software since Napster has included a complete set of accessories, allowing users to complete the action from search to download in one go. However, when it comes to BT, it becomes

Enter keywords (in other forums) -> find file information (in other forums) -> connect to BT tracker (on BT side) -> download (on BT side)

It has become two-stage. In other words, the BT download mechanism itself skips the search process completely. It operates under the assumption that "the user has found the desired file and only needs downloading". Why is this? The most likely also The most reasonable guess is that searching for this is more difficult than everyone thinks, especially in P2P networks.

Today, many people's impressions of ``P2P'' remain in ezPeer, Kuro and Foxy download software. In fact, the popularity of these software has misled many users to a great extent: they are not truly pure P2P in structure . The real academic definition of P2P is: a cooperative mode in which any role can be replaced by others at any time. What does pure P2P mean? Let me give you an example. Suppose today is the first day of a certain elementary school. , The teacher came and told the students to choose a monitor. Of course there are many ways to elect a monitor. The following are two possible ways:

1. Directly appointed by the teacher

2. The students elected each other, and finally voted for a class leader. The teacher did not intervene during the election process.

The first voting method belongs to a very typical ``master-slave architecture'', which is called client/server model in English. In this architecture, there is a role that is almost omniscient and omnipotent and cannot be replaced by others: Server (in this example) The middle is the teacher). The server issues commands to other people. The advantage of this approach is that the commands are unified and the commands are transmitted very quickly. The disadvantage is that the client (student) and the server (teacher) are difficult to parry, and once the teacher can't resist it After hanging up, the students will have no leader and it is difficult to control.

The second method is the standard "pure P2P architecture", which is called "Pure P2P" in English. During the selection process, everyone is on an equal footing, and it is possible to choose the monitor. And the person who chooses the monitor Although he may be one level higher than other classmates for the time being, because he was elected from the general classmates, once he is found to be unfit, everyone can use the same voting method to select a new class leader from the classmates at any time. The benefits of this approach Yes, if the voting method is well designed, tens of thousands of students can choose a new monitor in a few minutes, and there is no need to worry that if someone is absent, it will be impossible to elect a monitor.

P2P is used in many occasions, such as the sensor network that is still under development, or how various wireless communication devices (such as mobile phones) can connect with other mobile phones without a base station, etc. Of course, network downloads can also be One. To explain with the previous example, P2P download is like treating netizens all over the world as a classmate, and file exchange is regarded as a private exchange of small toys between students. However, troubles arise at this time. Now, without the help of a leader such as a teacher or class monitor, how can a classmate know which classmate has the toy he wants?

As in the previous example, there are two types of search methods, one is the master-slave architecture, and the other is pure P2P. Unfortunately, pure P2P search so far has been very inefficient. (With very few exceptions). The representative of the pure P2P search method is Anthill. As the name suggests, the search process is like ants looking for food. The user sends out many small ants, knocking on the door from door to door to see if there is any Good-hearted people are willing to provide the food the user wants. If you have it, send it back. If you don’t? Have to accept it. In fact, because of the large number of Internet users, it is impossible for the little ants to crawl through all the portals, so this search method There is no guarantee that you will find the files you should have. This slightly incomplete search method was used in the early Gnutella, FreeNet, and now winny in Japan.

The master-slave search method is more efficient. At first, one person is responsible for compiling the list of all the students in the class, and then let the student find the toy he wants based on the list. It won’t show up. "Obviously someone on the Internet has File, why the program tells me that I can’t find it". The early red Knapster is a representative of this kind. But as I said before, the disadvantage of the master-slave style: Although it is efficient, it will be more effective when there are too many people. Traffic jams, server-side resources are consumed fiercely and quickly. Not only that, in the era of digital music, there is another major drawback: easy to be sued! Knapster's server is instantly given by RIAA because it has a list of all files. It fell. After the server was suspended, Knapster was like a tree falling and scattered. Millions of users once owned have since been transferred to the embrace of others. Even if Knapster 2.0 comes back many years later, it will not be able to return to its prosperity.

So the P2P download environment can’t take into account efficient search methods and avoid the risk of the defendant? To solve this problem, the well-known KaZaA and eMule have appeared. These two file sharing software's practices are in the above two Among them, it takes into account the master-slave search structure and the advantages of pure P2P that the entire system does not hang up due to a single server failure. This method is called: Hybrid P2P (Hybrid P2P)

I believe this picture is easy to understand! In a hybrid P2P architecture, there are a number of servers. Each server serves a part of the user. When the user wants to find a file, the server first looks for it See if there is any match in the list in your hand, and at the same time ask if other servers have seen this file. The reason for this approach is called hybrid type, because it is a master-slave type... the servers are pure P2P cooperation is called pure P2P, and there is a division between general users and servers, and they are not interchangeable. Because it is difficult to determine which one is, it is called hybrid. Hybrid P2P considers both master and slave The search efficiency of the structured architecture also relieves the performance bottleneck of a single server. If one of the servers is down, at least there will be another server as a standby. Hybrid P2P has many benefits, and it has become eDonkey, eMule, KaZaA Wait for the main architecture of the software, but the only drawback is that it still requires a lot of resources to set up a server.

Seeing this, everyone should start to understand why BT does not have a built-in search mechanism. KaZaA is a commercial company, and it is not a problem to find funds to set up a server (especially now that KaZaA has launched Skype again, and it should be profitable. ). The predecessor of eMule is eDonkey, and eDonkey was also developed by a company called MetaMachine, so the server at the beginning of its establishment is not worried about no one to fund it. What about BT developer Bram Cohen? Sorry, he obviously has no resources From Mr. Friday’s own point of view, if today I don’t have the money to set up the server needed for hybrid P2P, and I can’t stand the pure P2P search environment, what would I do? Just don’t do the search function . The BT programs we see today assume that the user has found the torrent file to download. Obviously it was born under this situation. Therefore, BT relies heavily on forums all over the world, because if these forums do not provide With the BT file search function, many people will not find where the torrent file they want for a lifetime. So in the future, is there any way for BT to modify the program and change it to eMule, which can automatically search for the torrent file? I don’t know. But it is obviously difficult, because rewriting the program is a very troublesome thing, and from the webpage of Bram Cohen, his focus is no longer on maintaining the BT code.

So what about the DHT technology that BT has developed now? DHT technology is also a pure P2P mechanism, which aims to make Tracker (if you think about it carefully, this is the only thing designed with a master-slave architecture in BT) to be completely free The mechanism for users to share and record the user list: each person records some lists separately, as long as you find one person first when connecting, you can gradually get everyone's name. Because some super users are always online, they participate in downloading more BT files , So there is a list of participating members of various BT files, and there is a vague taste of the eMule server. How about searching the BT records in the hands of these super users to achieve the search function? Well, this is a feasible way, but It will take some time to develop. After all, there is no optimization algorithm for search in BT: How to efficiently store the list of BT personnel in everyone's hands? What method is used to search for super users (send ant male soldiers) Knock on the door of the super user’s house, the super user’s house will be overwhelmed. The really powerful search method can find the information you want without sending so many people)? Or how to determine who is a super user... If there are no good answers to these questions, BT still has a long way to go in search.

The perspective of the BT series comes to an end here, will I write a series of P2P related applications next? Maybe, but it depends on whether I am interested in it, and I think it is worth introducing to everyone!

ps recently saw a traffic test report of PPStream, PPLive, Sopcast and other Internet TVs. Although these programs are designed to be confidential, what can be read from the test report? Well, Mr. Friday is still studying Medium, but it seems quite interesting, maybe I will write an article later!

Guess you like

Origin blog.csdn.net/jrckkyy/article/details/5957529
Recommended