Distributed Systems reading notes (10)-----Peer-to-peer network system

Source: Internet
Author: User
Tags log log

First, Introduction

The full name of the peer-to-peer system is peer-to-peer system. His presence makes it possible for resources to be shared across all nodes, provided that he is connected to the Internet. All resources and data objects are distributed across nodes in the peer-to-peer system.

1, peer-to system can be used in some distributed applications and services.

2. A good resource storage algorithm is very important in peer-peers.

3, it is because of the 2nd reason above, the emergence of peer-oriented middleware, the purpose is to locate the location of resource objects or replica fault-tolerant processing, each resource in the form of a GUID to distinguish the label recognition.

Second, example: Napster

A typical example of peer-to Napster? What is he, Baidu Encyclopedia on the explanation:Napster is a network can download their own desired MP3 file software. It also enables its own machine to become a server, providing downloads for other users. A simple sentence is a system that can share music files. Napster uses the way of the central index, the user wants to find resources, first to the index server to find the index of resources, and then according to the index to the destination node download resources, the index server itself is not storage resources. Therefore, there is a single point of Index server bottleneck problem. One of the problems in the Napster and peer system is the version issue, because the data is fully shared.

third, peer middleware

1. One of the core functions of the peer middleware is to provide a level that allows clients to access resources more quickly. In Napster is the way to include the index of a file.

2, of course, peer should also need to do some of the following requirements: 1, the overall scalability. 2, load balance. 3, can communicate with the neighbors. 4, can control the increase and departure of the node.

Iv. Routing Overlay

1. In the peer-to system, the routing overlay is used as a distributed algorithm to locate nodes and data objects.

2. Each object will have his own GUID.

3, the routing layer will do some other operations: 1, add an object. 2, or delete an object.

Five, the cover layer example: Pastry,tapestry

1, pastry is one of the four routing algorithms, mainly to do message routing. Tapestry is used to do the mass storage of data.

2. Similarly, pastry assigns a 128-bit GUID to each node, which is computed by the secure Hash algorithm, which is the SHA algorithm.

3, Pastry provides an algorithm to find the nearest neighbor: by sending information to calculate a round-trip delay delay, which is shorter than the time, which is the shortest, the nearest distance.

4, pastry fault-tolerant mechanism is also through the periodic sending heartbeat the way of error monitoring.

5. Tapestry is also a GUID-based route for message routing.

6, here refers to a non-structure of the peer system, said before is by the structure of the peer-to system, the advantages of no structure is that he is pure self-management of their own, simple structure, but can not guarantee the accessibility of objects, object search is purely a way to find neighbors, Then through neighbor to find neighbor neighbor. The disadvantage of having a structured peer is too complex.

Six, the application example of covering layer: Squirrel,oceanstore,ivy

The Routing overlay layer principle has been used to make a lot of applications, such as the squirrel of the Web cache service based on pastry, and the oceanstore,ivy behind it.

1, the resources here are generally stored in 2 places, a call original server, the original server, a proxy server, proxies, that is, the place to store the cache, only if the proxy server is not hit cache use, will want to original server to go to load in return requestor.

2.Oceanstore Project is a distributed storage application on the Internet based on peer structure, he uses a copy-on-write strategy to update files, so there will be a lot of versions of the files.

3, Ivy is a reader-to-peer file system, there is a special service is log log service, as long as the file is written to record the corresponding log, so you can use the log for data recovery.

4, Ivy to update the use of the strategy is: CLOSE-TO-OPNE, is the update operation only in the condition of the file closed, this time there is no process in use.


References: <<distributed sysytems Concepts and design>> original version fifth, Author:george Coulouris,jean Dollimore, Tim Kindberg,gordon Blair

Distributed System reading notes (10)-----Peer-to-peer network system

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.