Thoughts on P2P download

Source: Internet
Author: User
Tags md5 digest
1. Using multiplexing or asynchronous I/O models, this is a common technology for server segments. However, in P2P applications, each machine is both a server and a client, if you share a very popular file, there may be many people who want to connect to it, or you may find hundreds of thousands of peers when downloading a popular file, in this case, it is necessary to adopt multiplexing or asynchronous I/O technology to reduce application Program Resources used.

Invalid. the MD5 file can be downloaded. In this way, the P2P download tool searches for more resources in the P2P network through MD5, so that the customer can get a better speed, the server may also reduce the downloaded network traffic.

3. popular P2P network protocol support, including Bt and eMule. Both are open-source protocols and can be referenced and rewritten. It is not difficult to support them.

4. robustness. Like eMule, when a file is segmented (piece), a piece_id is generated for each summary, and all piece_ids are abstracted into a total ID to become AICH. In fact, this is also a very simple technology. It is not difficult to implement it, and there can be a variety of practices.

5. Special support for large-scale LAN. In reality, there are many large local networks with high-speed bandwidth. There are also many special ways to support LAN, such as creating a tracker server in the LAN like BT. If it is based on JXTA, you can deploy the aggregation point (rendezvous) in the LAN)

6. P2P directory sharing is supported. Currently, popular P2P download tools do not support P2P sharing and downloading by directory. In fact, it is not difficult to support P2P directory sharing. When providing sharing, you can provide a directory structure information. The directory structure information dir_info can be recorded as follows: the offset length of the sub-file or sub-directory path. Of course, it is also possible to compress the Directory and provide download, but this will waste the disk space of the sharer. For directory sharing, you must consider file modifications and adding new files after sharing. Using dir_info can better solve this problem.

7. About the announcement. A P2P shared resource (including Files And Directories) should contain three IDs: content_id, aich_id, and dir_info_id. Here, content_id is the summary of the entire resource, aich_id is the ID generated by each Digest ID, and dir_info_id is the abstract ID of dir_info.
Content_id is available for resource search. We recommend that you use MD5 Digest to generate it, because many files downloaded on the Internet now provide a. MD5 suffix verification file.
Aich_id is used for checksum and smart recovery
Dir_info_id. If dir_info is calculated independently when content_id is calculated, dir_info_id must be provided to verify dir_info. In theory, dir_info can be used as part of content, but I think dir_info Independent Computing will bring many benefits.

8. About transmission. Resource transmission should include three parts: hashset transmission, dir_info transmission, and content data transmission. Content transmission is segmented, and I think the default value of K for BT is quite good. Each piece digest calculates a piece_id. All piece_ids are put together as a hashset. The hashset name is not very good and intuitive, but since the eMule protocol is like this, that's all I have to say. Dir_info is optional, and file sharing does not contain dir_info.

9. the application scope of P2P download technology should be extended, and installation and update of programs should be added to P2P support, which will greatly improve the user experience of the program.

10. P2P platforms should be well scalable. When we build a large P2P platform, we not only share files on it, but many applications can be deployed on it, including the popular P2P Video, distributed computing. Instant messaging can also be built on P2P networks. In the face of many application requirements, we need a protocol with good scalability. It should not be like BT and eMule, except for downloading. It may be a good choice based on JXTA.

11. Security. P2P networks should support security features. Some groups and enterprises need to share resources within a limited scope. For example, NASA's satellite data sharing project saxta adopts JXTA because JXTA supports security features. I think many P2P application scenarios require security. For example, enterprises only want P2P resource sharing among internal employees.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.