Presentation is loading. Please wait.

Presentation is loading. Please wait.

Adlib : A Self-Tuning Index for Dynamic Peer-to-Peer Systems Proceedings of the 21st International Conference on Data Engineering(ICDE'05) Prasanna Ganesan.

Similar presentations


Presentation on theme: "Adlib : A Self-Tuning Index for Dynamic Peer-to-Peer Systems Proceedings of the 21st International Conference on Data Engineering(ICDE'05) Prasanna Ganesan."— Presentation transcript:

1 Adlib : A Self-Tuning Index for Dynamic Peer-to-Peer Systems Proceedings of the 21st International Conference on Data Engineering(ICDE'05) Prasanna Ganesan Qixiang Sun Hector Garcia-Molina 鄭達成 69421023

2 Outline Motivation Adlib Structure Modeling and Optimizing Cost Make it self-tunable Evaluation Conclusion

3 Motivation A P2P system consists of a large, dynamic set of computers spread over a wide-area network. Nodes are interconnected in an overlay network, we focus on the nodes that contain related data. There are two fundamental operations – partial query and total query. Consider two common indexing structures that have been proposed in past literature. Gnutella – High query cost, but index maintenance is free. Hash/range partitioning – Efficient query, but index maintenance cost is high.

4 Trade-off index-maintenance and query cost Such a global index offers efficient querying; a query is just answered by contacting the managing node. In such systems, the index-maintenance cost of the global-index approach can be very high. Worse still, as the data scale up, the cost of index maintenance grows much faster than cost of queries. Therefore, Adlib provide a self-tuning index that can minimize the cost of index maintenance and query execution.

5 Adlib Structure Adlib can be viewed as a two-tier structure. Intra-domain : Nodes within each domain construct a distributed index over the content in that domain. Inter-domain : Some particular nodes in a domain connecting to nodes in other domains

6 Intra Domain structure – 1/2 Partition indices into different domains using Consistent-Hashing. Each node in a domain chooses a unique intra-domain ID, at random, from a large, circular space of IDs. A node stores index entries for all values that hash to a number between the node’s ID and the next larger node ID in the domain. Recall that the index entry for a value is a list of all nodes in the domain that have a tuple with that value.

7 Intra Domain structure – 2/2 Nodes are interconnected so they are able to route a query q to the manager of the index entry for q. Two operations need to take place when new node joins: (a) the overlay network structure needs to be modified suitably. (b) index entries need to be re-distributed across nodes. (c) the index needs to be updated so that the new node’s content is indexed, or that the old node’s content is removed from the index. Updating the index when a node leaves is more interesting. We now describe two approaches to this problem.

8 Intra Domain – timeout & update broadcast The timeout mechanism – Each inserted index has a T 0 period, after this period, it “times out” and being deleted. The size of the time period T 0 offers a trade-off between the cost of maintaining the index and query accuracy. The update-broadcast mechanism – Whenever a node N leaves, its successor broadcast the departure information of N to all the nodes. How does N’s successor know? -by exchanging periodic heartbeat. The cost for broadcasting the failure of a node is completely independent of the number of tuple owned by each node.

9 Inter Domain structure Executing a partial or total lookup requires nodes to be able to gather results from some or all domains. Partial querying procedure : (a) a node first find all answers to a partial lookup query within its own domain. (b) while the answers are insufficient, the node keeps doubling the number of domains. (c) until either a sufficient number are found, or all the domains have been searched. When a node desires a total lookup, the query is simply sent to all the domains.

10 Adlib validation The optimal number of domains is proportional to √n for total lookup queries, and proportional to n for partial lookup queries. (horrible math being skipped! ) Evaluation background : (a) 3791 nodes (gathered by Saroiu et al. in Gnutella) (b) 400,000 files (each filename keyword as a tuple) (c) t=307 on average (t=tuple) (d) 0.00083 queries per node per second (one query per node per 20 minutes) We simulate an n-node Adlib with k-domains, assigning each node to a random domain.

11 Adlib validation – update costs Our first undertaking is to evaluate the relative costs of index maintenance with time-outs and update broadcast. We see that if T 0 is 1 hour, the stale answers exceed 40%, in order to achieve a staleness of under 10%, T 0 needs to be smaller than 10 minutes.

12 Adlib validation – cost of update broadcast The cost of broadcast increases linearly with the size of the domain, and exceeds time-out mechanism for domain size larger than 5000. We conclude, that update broadcast is better than time- outs for reasonably sized domains.

13 Adlib validation – cost of queries Both partial and total lookups terminated after finding the first 20 answers. Not surprisingly, we see that the cost of queries decreases as the domain size increases.

14 Adlib validation – overall cost We define the overall cost as the sum of the query cost, the index-maintenance cost, and the cost of maintaining the interconnection structure. On the right extreme, nodes process an average of 0.6msg/sec, where a partial lookup with 256 domains need only 0.15msg/sec.

15 Adlib validation – optimal domain size For a total lookup, we observe that the optimal domain size is almost exactly proportional to √n. The ideal domains size for partial lookup is almost a fixed constant.

16 Designing a self-tuning Adlib In Adlib, we split a domain into two whenever domains is too few, and to merge two domains whenever there are too many domains. Performing such domain splitting (and merging) introduces multiple challenges : (a) The overlay problem (b) The re-indexing problem (c) The atomic-split problem The following pages will presently show how each of the above challenges may be handled.

17 Domains as a binary tree Initially, all nodes are in a single “root” domain D. As the domain grows larger, it splits into D0 and D1. Domain D0 may itself grows larger over time, and split into D00, D01 and so on. Similarly, two sibling domains may merge into a single domain. (delete two leaves from the tree)

18 The overlay problem – intra domain structure In standard overlay networks such as Chord, the set of links for the D0 and D1 are very different from the set of the links in the original network for D. (In expectation, half the links in D will exist in D0 or D1, while the other half are new links) Our problem is : devise an overlay network that allows domains to split and merge without changing any links. Crescendo – A node first join and sets up links to other nodes at the lowest lever in the hierarchy, and progressively adds few more links at each higher level. goto22

19 The overlay problem – inter domain structure Consider a node m with hierarchy ID b 1,b 2,…,b N, let S i denote the set of nodes with hierarchy ID prefix b 1,b 2,…,b i. Node m establishes a set of N inter-domains links, with the i th link being to the closest predecessor of m in the set S i. The link not just to any node in the subtree, but to the node whose intra-domain ID is closest in value to m’s ID while being less than or equal to it. The total number of inter-domain links per node is at most the number of non-empty levels in the domain hierarchy.

20 optional Query routing for partial lookup Let us first consider partial lookup queries. D D0D1 D00D01D10 D11 a b c d e f level-1Inter domain link level-2 Inter domain link lntra domain link

21 Query routing for total lookup The first step in a total lookup is the same as the partial lookup. Node 0 then sends the query using all “inter-domain” links that connect to nodes outside its current domain. For example, node 13, it is responsible to broadcasting the query to all domains in the entire D1 subtree. Node 0 also sends the query to its predecessor in D01, designating it responsible to broadcasting to all domains in D01 subtree. The primary difference from the partial lookup algo is that node 0 uses all its inter-domain links simultaneously.

22 The Re-indexing problem When domain D splits into D0 and D1, index entries need to be moved since the D0 nodes should now index only content in D0. (while D1 index contents only in D1) When the domain splits, node 0 should index only D0 content in range [0,3), while node 2 indexes D1 content in [2,5). Node 0 obtain index entries for D0 content in [2,3) by communicating with node 2. Similarly, node 2 communicates with node 3 to obtain all its index entries. Such data exchange is easy by the fact that these pairs of nodes also have interconnection links. goto18

23 The Atomic-split problem When to split ? – we can estimate the domain size by “Network size estimation”, to determine is it too big or too small. Path Convergence- S : l-bit prefix in their hierarchy ID. m : a node not in S that shares a prefix of length l’<l The routing path from every node in S to node m, using intra-domain links, must go thru some common node c in S. This common node c is the closest predecessor of node m in S.

24 Evaluation The cost shows a step-like behavior, dropping every time domain splits occur at network sizes close to a power of 2.

25 Conclusion This paper introduced a self-tuning index structure that trades off index-maintenance cost against the benefit for query. We have shown that Adlib can reduce the system overhead by a factor of four, compare to the global index.


Download ppt "Adlib : A Self-Tuning Index for Dynamic Peer-to-Peer Systems Proceedings of the 21st International Conference on Data Engineering(ICDE'05) Prasanna Ganesan."

Similar presentations


Ads by Google