Presentation is loading. Please wait.

Presentation is loading. Please wait.

CCAN: Cache-based CAN Using the Small World Model Shanghai Jiaotong University Internet Computing R&D Center.

Similar presentations


Presentation on theme: "CCAN: Cache-based CAN Using the Small World Model Shanghai Jiaotong University Internet Computing R&D Center."— Presentation transcript:

1 CCAN: Cache-based CAN Using the Small World Model zoufutai@cs.sjtu.edu.cn Shanghai Jiaotong University Internet Computing R&D Center

2 P2P Systems Two Classes: –Unstructed P2P Sytems High searching cost:Flooding with blind search may induce huge unuseful messages. Undeterministic search: It is hard to find these rare items. –Structured P2P Systems The right search depends on a valid geometry structure. The maintaining cost of the structure is due to the construction of this geometry. The limitation for current structured P2P systems –Chord/Tapestry/Pastry better routing hops O(logn) with relatively higher maintaing cost O(log 2 n ), where n is the number of the node. –CAN worst routing O(dn 1/d ) with relatively lower maintaining cost O(2d), where d is the dimension of a torus –like structure.

3 Goal Deterministic search Low search cost Low maintaining cost Better routing hops

4 Why CAN? CAN is a classic structured P2P system. It has : –A deterministic search –Low search cost –Low maintaining cost want: –Better routing hops with low maintaining cost

5 CAN Example Space divided between nodes All nodes cover the entire space Each node covers either a square or a rectangular Each node knows its neighbors in the d-space Forward query to the neighbor that is closest to the query id Example: assume n1 queries f4 1 234 5 670 1 2 3 4 5 6 7 0 n1 n2 n3 n4 n5 f1 f2 f3 f4

6 Construct Small World Network Kleinberg’s Model Theory (Kleinberg 1999) –node S should choose long range contact T with the probability of L -r, where L=||S-T|| is the Manhattan distance between node S and T, and r is the dimension degree of the underlying topology. The distribution of long contact is called the inverse rth-power distribution by Kleinsberg. It gives an upper- bound path length O(log 2 n) even with one long range contact.

7 Kleinberg’s Construction(2d-Grid) The key is the probabilistic distribution of the long contact, which should follow up the inverse r th -power distribution.

8 How to improve CAN? Construct Small World Network for CAN systems Add k long contacted edges for each node The Problem: –How to reduce the additional overheads for the construction of small world network? Cache long contacted edges instead of the real edges. –How to realize the inverse r th -power distribution for these long contacted edges? Probabilistic replacement Mechanism Improved CAN is called CCAN (Cache-based CAN )

9 CCAN Topology An illustration of CCAN topology and message forwarding in CCAN. There are 12 nodes distributed in the 8*8 lattice and a sketch map of routing table of node n4 is shown in the lattice. For a query message for item f3 originated from n3, it is forwarded with the greed strategy to the node that is closest to the query id. There is a shortcut from n4 to n12 because of the cached long contact in the routing table of n4.

10 When & How to Cache When: routing process How: replacing with a counting probability Suppose a worm routing with probabilistic replacement algorithm –Node S send a query request for Node T –During the routing process, the passed node P (including the target node) caches the Node S with a counting probability. –For any passed node P, suppose it has a cached long contact K. The counting probability: α = ||P-K|| d / (||P-K|| d + ||P-S|| d ) if random(0.,1.)< α cache S and evict K ; else still keep K The farther the distance is, the less the replacing probability is. It is in accord with the spirit of the small world model.

11 Cache Replacing Example Node n1 queries item f3, cache replacement happens along with the forwarding routing of the query message.

12 Theorem Theorem 1: Repeating the probabilistic cache replacing procedure in the system. Considering the node space N,  s  N, s would cache t (t  N∩t≠s) with probability proportional to ||s-t|| -d in CCAN with d dimension degree. * The cache mechanism gradually constructs the distribution of long contacts as same as Kleinberg’s construction. Theorem 2: With the help of the probabilistic cache scheme, CCAN system presents the small world phenomenon with the expected number of hops is O(log 2 n). Here n is the number of nodes in the system, and d is the dimension degree of CCAN. * The routing hops is improved from O(dn 1/d ) to O(log 2 n). See the proof in the paper

13 More Considerations 1. Dynamic Convergence 2. The Speed of Convergence 3. The Maintenance of Routing Table 4. Multi Cached Long Contacts

14 Convergence and Reality Reality: –the query is generally the uppermost operation in P2P systems Convergence ( form a small world network) –By means of the effort of the query –The speed is affected by dynamic network few queries Solution: –Active query mechanism

15 Active query mechanism Goal: to handle the dynamic network or fewer queries so as to accelerate the convergence for a small world network. A peer node would invoke a active query procedure with a time interval. The time interval is due to the dynamic characteristic and the current queries.

16 Repair Routing Table with Cache Effect Principle: –During routing process, the node’s long contact is replaced with the current visiting “live” node with the probability α. So current cached long contact is invalid, it can be auto- repaired with the probability α. The effect may help to reduce the maintaining cost of cached long contact.

17 Cost Evaluation I. The cached long contact has the flag: invalid/valid. Only the flag is valid, the routing considers the long contact. The flag is maintained by a backgroud process and it brings additional maintaining overheads. –(1) The routing can keep the correctness though the cached long contact may be invalid and the updated messages sent in a fixed period are few. –(2) Cache Effect reduces the maintaining overheads. II.The active procedure may create additional messages on the network. –(1) for fewer queries, these additional messages do not much affect the system. Fortunately, the most p2p application is query intensive. –(2) for dynamic network, the join & leave of the node can be treated as a active query so that the additional messages is controled.

18 Experiments 1.Static Convergence 2.Dynamic Convergence 3.Routing Hops

19 Setup 2-dimensional CCAN equipped with 1024 nodes Two nodes are randomly chosen from the network and one initiates a query for the other The routing hop number and the times of cache replacement are recorded in every query. After 100 queries are made, the average path hops and the average replacing times per node are counted.

20 Static Convergence Each data point is the average of 100 queries.

21 Dynamic Convergence Each data point is the average of 100 queries.

22 Path Hops

23 Related Work Symphony [USITS 2003 ] –uses a continuous version of Kleinsberg’s construction –bear high adjusting overheads compared with our cache scheme when the node join and leave dynamically. Improved Freenet [Infocom2002] –a probabilistic cache to model small world phenomenon –focuses on data-key cache which is much different from our node cache. Deterministic cache replacing –improve the hit rate [unstructured p2p systems] – reduce the hot problem [structured p2p systems] –Our probabilistic cache replacing is not only to aid routing and also to realize a unique effect with an expected path hops.

24 Conclusions Using small world model theory, Cache-based CAN has the characteristics: –Deterministic search –Low search cost –Low maintaining cost –Better routing hops The probabilistic cache scheme is successfully introduced into CAN in this paper. However, it is easily to be extended to a class of P2P systems with low-degree routing networks and only needs a few modifications. Especailly, the scheme favors these resource sharing P2P systems, which are very popular in today’s applications.

25 Thank you! zoufutai@cs.sjtu.edu.cn


Download ppt "CCAN: Cache-based CAN Using the Small World Model Shanghai Jiaotong University Internet Computing R&D Center."

Similar presentations


Ads by Google