During the summer vacation of the college entrance examination, I was discussing with my brother how to implement p2p file sharing in our school. Today, we have never been able to launch a publicity program. The upper limit is the upper limit. At that time, the idea has been improved: "Students upload shared files to the servers in our studio, and the servers generate seed links. Users can use the software for download. When downloading, they will first search for the computer in the School LAN and retrieve the corresponding files. "I also analyzed the Project. However, because I was the only one to write this article, the website was not connected, so I was not able to make up my mind. Before the completion of the Qing Dynasty, while there was a large-scale component design project, the two of us immediately added their names and made them p2p. Later, when chatting with cert, he added them to us. Then, we made three ambitious plans within 20 days. I think we are very good at cooperating with Alibaba Cloud. Our brother is engaged in the post-production of php, And we will submit our documents with Alibaba Cloud.
Some technical issues encountered on the way, after discussion and analysis, all come up with better solutions, I couldn't think of a good method in addition to penetrating another Wi-Fi Intranet (my previous article: http://blog.csdn.net/christopherwu/article/details/23714247 of communication issues between two local networks) the Upload File only contains the contents of the Upload File and MD5, which determines whether the upload file is duplicated and the MD5. large file is used for 10 MB to calculate the MD5, example of special output: 1. A needs to write down the Z file, B, C, and D. The file is fixed in minutes, then B Branch sends 1, C branch 2, D Branch 3, and keeps max_number. When someone finishes sending, such as C, max_number + 1, then he sends max_number + 1 * block_size. 2. When only A has A file (such as the latest movie), more than 100 of the people will arrive at the bottom of the file. A needs to give 1 to B and 2 to C, B then sends 1 packet to C and D. In this case, we have already completed the generation of 1 packet, 2 packet, and 41 ....
We still got the test. At some time, such as late night, when no peer is running, or when cold data sources are available, we must submit a copy of the data source. At the beginning, I plan not to upload the contents to the server, but to upload files to the server, in a certain period of time, we will delete the ultra-large data source (cold data sources need to be copied ). Later, I used the Web Hosting Api to upload to the website, and used php to create a web hosting certificate to open the website. To prevent the website from dying like 115, we are planning to prepare two different websites. It also uses the segmentation system to enable the upper-right corner and lower-right corner for acceleration. Dormitory quotas are used to show the upper-right corner and make friends;
The reason that forced us to die was: 1. There is no way to achieve real p2p, not a technical problem, but a problem. First, the school is rarely used. Second, in terms of resources, apart from the long-term retention, the others are almost exhausted (such as movies ). In this case, the sub-accounts cannot do p2p. What is P2P spirit? Everyone is me, everyone is me! In P2P download mode, each user is both a downloader and a uploader. This is the most difficult part. 2. Upload the hosts file. This can be done, but the three aspects of file size, copy of resources, and File Duplication cannot be solved. However, the file can only be uploaded. After the file is uploaded using the upload method, the source file will be deleted, and no p2p is available .. In this way, it almost becomes that only one source provides the resource, and p2p is lost. This is a problem that was discovered only after a deep dive. Currently, we cannot think of the Limit Method. Haokan! So unwilling. We all design p2p based on our own ideas, and the final conclusion is as follows.
Previously, our studio had similar data source sharing (in the form of ftp), but the server had a hard nut to crack, the users who have special roles on the server cannot handle this problem. The most important thing is that the server is completely dead. We do p2p.
//////////////////////////////////////// //////////////////////////////////////// /// // I originally intended to use a p2p attachment to revitalize the image. master of internal documents, however, this death left me helpless in applying internal documents... The mobile applications and Web applications that the component can do are almost all done, and they are more convenient and difficult to do.