220 likes | 313 Views
Technion –Israel Institute of Technology Computer Networks Laboratory. A Comparison of Peer-to-Peer systems. by Gomon Dmitri and Kritsmer Ilya under Roi Melamed supervising Winter Semester 2003.
E N D
Technion –Israel Institute of TechnologyComputer Networks Laboratory A Comparison of Peer-to-Peer systems by Gomon Dmitri andKritsmer Ilya under Roi Melamed supervising Winter Semester 2003
Background“Peer-to-Peer refers to a class of systems and applications that employ distributed resources (i.e., computing power, networking resources) to perform a task (i.e., content delivery, collaboration, e-commerce) in a decentralized manner on general-purpose operating systems and platforms. Peer-to-Peer (P2P) systems are increasingly becoming popular because they provide opportunities for real-time communication, ad-hoc collaboration and information sharing (e.g., illegal music-swapping in systems like Napster and Gnutella) in a large-scale distributed environment. Much research effort has focused lately on understanding theissues and solving the research problems in the P2P systems. In a dynamic environment, peers frequently join and leave the system.
MotivationP2P computing raises many interesting research problems in distributed systems. In this project we will investigate one of them, the lookup problem. How do you find any given data item in a large P2P system in a scalable manner, without any centralized servers or hierarchy? This problem is at the heart of any P2P system. It is not addressed well by most popular systems currently in use, and it provides a good example of how the challenges of designing P2P systems can be addressed.
The Goal of the Project • Implementation of the query algorithm based on multiple random walks as described in“Search and Replication in Unstructured Peer to Peer Networks” paper. • Execution of simulations with various parameters. • Analysis of the results.
Introduction • Currently, there are several different architectures for P2P networks: • Centralized:Napster and other similar systems have a constantly-updated directory hosted at central locations (e.g., the Napster web site). Nodes in the P2P network issue queries to the central directory server to find which other nodes hold the desired les. • Decentralized but Structured:These systems have no central directory server, but they have a significant amount of structure. The les are placed not at random nodes but at specified locations that will make subsequent queries easier to satisfy. The the Freenet P2P network is an example of such systems. • Decentralized and Unstructured:These are systems in which there is neither a centralized directory nor any precise control over the network topology or le placement. Gnutella is an example of such designs.
Introduction(cont) • We focus on Gnutella-like decentralized, unstructured P2P systems. • To find a file, a node queries its neighbors. The most typical query method is flooding, where the query is propagated to all neighbors within a certain radius. These unstructured designs are extremely resilient to nodes entering and leaving the system. However, the current search mechanisms are extremely unscalable, generating large loads on the network participants. • We implement more-scalable alternatives to existing Gnutella algorithms, focusing on the search and replication aspects. We quantify the poor scaling properties of the flooding search algorithms. We then propose, as an alternative, a k-walker random walk algorithm that greatly reduces the load generated by each query.
Introduction • What does it mean “Random walk” ? • Random walk is a well-known technique, which forwards • a query message to a randomly chosen neighbor at each step until the object is found. We call this message a “walker". • The standard random walk (which uses only one walker) • can cut down the message overhead by an order of magnitude compared to expanding ring across the network topologies. However, there is also an order of magnitude increase in user-perceived delay. We implement one walker algorithm
What does it look like? Why shouldn’t I find a song? A sends a walker to find song.mp3 that is stored on B A B
Introduction • Replication • When a node finds a file, it also gets an information about source of the file, e.g. which node the file has been retrieved from. Sharing this information with other nodes in a P2P network should obviously improve performance of the P2P lookup mechanism. • Such sharing mechanism is called “replication”. In certain P2P systems such as Gnutella, only nodes that request an object make copies of the object. Other P2P systems such as Freenet allow for more proactive replications of objects, where an object may be replicated at a node even though the node has not requested the object.
Introduction • There are various replication strategies. We implement three of them : • “Owner replication", where, when a search is successful, the object is stored at the requester node only. One can call this strategy as “No Replication”. Owner replication is used in systems such as Gnutella • “Path replication", where, when a search succeeds, the object is stored at all nodes along the path from the requester node to the provider node. Owner replication is used in systems such as Gnutella. Path replication is used in systems such as Freenet. • “Random replication” , where, when a search succeeds, we count the number of nodes on the path between the requester and the provider, p, then randomly pick p of the nodes that the k walkers visited to replicate the object.
Simulation terms and parameters • Buffer size – size of the node’s local tables, where it keeps information about its resources. There is the “Local Resources” table where a node keeps the resources it has, and the “Global Resources” table where it keeps “pointers” to some resources on the network. This table is a result of a replication mechanism. Both the tables have the same size. • Replication Ratio – the number of initial copies of some resource on the network. • Unique resources – the total number of different resources on the network. • Replication strategy – No Replication, Path Replication or Random Replication • TTL – the number of hops it takes a walker to find the requested resource. • Success ratio – the percentage of walkers which succeeded to find the requested resource .
Simulation Methodology We base our project on an already implemented code that generates a k-node network, where each node “knows” number of its neighbors. implement a Node, which simulates a single user workstation. As each workstation wakes up, it requests a vector of initial resources. The resources distribution is conducted according to the specific policy defined per simulation. As the network has been created, random requests begin to get generated. We used uniform distribution in choosing target nodes as well as resources. As a node accepts a new request, it unleashes walker to start looking for the resource. As the walker returns, the node updates its pool of resources as well as global statistics. On the Random and Path resources distribution, the node disperses the shortcuts of the found resource among other nodes, as described above.
Simulation Methodology - Statistics As the walker returns, each nodes updates the global statistics If a walker has found the resource, the global TTL gets updated according to the walker’s TTL field (=number of hops walker has passed until it found the resource), otherwise the global TTL is left unchanged. The global success_ratio field is influenced by whether or not the walker has found the requested resource We used 20,000 walkers per each simulation (network graph consisting of 100 or 200 nodes) and used an average of 3 simulations to calculate the result
Results & Analysis When used replication technique, TTL becomes much lower. There are virtually no differences in TTL between Path and Random replications on the 100 nodes graphs, however on the 200 nodes graphs and on larger buffer sizes, the Random Replication performance appears a bit better.
Results & Analysis Random Replication showed the best results on all simulations. The difference on 200 nodes graph was slight, as compared to 100 nodes graph. As expected, no replication performance was the worst.
Results & Analysis RR=1, 2: no apparent differences between types of replication RR=5: Slight differences begin to emerge , Random Replication shows the best results, after it - Path Replication. Reason for such low performance: There is not enough place in buffers for initial distribution of the resources, thus many initial resources get lost in the beginning.
Results & Analysis Again, as expected, Random Replication shows the lowest TTL, after it, at a slight difference comes the Path Replication. Later on there is a gap to the No Replication technique performance. There is also a substantial difference between RR = 1,2 and RR=5 (drop from TTL = ~25 to TTL = ~20).
Results & Analysis Again, as expected, Random Replication shows the best results in both cases.
Results & Analysis Success ratio is much lower than in the uniform size distribution case, since the probability of each resource not to find its place on the initial distribution is much higher. We changed the initial distribution algorithm (now each resource, if the node it is about to be distributed to is already full, will be distributed to a node with empty space) and also the number of distributed resources. As a result, the success ration increased (from ~15% to ~99%).