ccan: cache-based can using the small world model [email protected] shanghai jiaotong...

25
CCAN: Cache-based CAN Using the Small World Model [email protected] Shanghai Jiaotong Univers ity Internet Computing R&D Ce nter

Upload: marvin-mccoy

Post on 16-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

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

CCAN: Cache-based CAN Using the Small World Model

[email protected]

Shanghai Jiaotong University

Internet Computing R&D Center

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

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(log2n ) , where n is the number of the node.– CAN worst routing O(dn1/d ) with relatively lower maintaining cost O(2

d), where d is the dimension of a torus –like structure.

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

Goal

• Deterministic search

• Low search cost

• Low maintaining cost

• Better routing hops

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

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

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

CAN   Example

• Space divided between nodes• All nodes cover the entire spac

e• Each node covers either a squ

are or a rectangular• Each node knows its neighbor

s in the d-space• Forward query to the neighbor

that is closest to the query id• Example: assume n1 queries f4

1 2 3 4 5 6 70

1

2

3

4

5

6

7

0

n1 n2

n3 n4n5

f1

f2

f3

f4

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

Construct Small World Network

• Kleinberg’s Model Theory (Kleinberg 1999)– node S should choose long range contact T wi

th 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(log2n) even with one long range contact.

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

Kleinberg’s Construction(2d-Grid)

The key is the probabilistic distribution of the long contact, which should follow up the inverse rth -power distribution.

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

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 rth-power distribution for the

se long contacted edges?• Probabilistic replacement Mechanism

• Improved CAN is called CCAN (Cache-based CAN )

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

• CCAN Topology • An illustration of CCAN topology and message forwarding in CCAN. T

here 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.

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

When & How to Cache

• When: routing process• How: replacing with a counting probability• Suppose a worm routing with probabilistic replacement al

gorithm– Node S send a query request for Node T– During the routing process, the passed node P (including the tar

get 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.

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

• Cache Replacing Example • Node n1 queries item f3, cache replacement happens along with the fo

rwarding routing of the query message.

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

Theorem• Theorem 1: Repeating the probabilistic cache replacing procedure in

the system. Considering the node space N, sN, s would cache t (tN∩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(log2n). 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(dn1/d ) to O(log2n).

See the proof in the paper

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

More Considerations

• 1. Dynamic Convergence

• 2. The Speed of Convergence

• 3. The Maintenance of Routing Table

• 4. Multi Cached Long Contacts

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

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

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

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.

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

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.

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

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 contac

t 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.

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

Experiments

• 1.Static Convergence

• 2.Dynamic Convergence

• 3.Routing Hops

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

Setup

• 2-dimensional CCAN equipped with 1024 nodes • Two nodes are randomly chosen from the netwo

rk and one initiates a query for the other• The routing hop number and the times of cache r

eplacement are recorded in every query. After 100 queries are made, the average path hops and the average replacing times per node are counted.

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

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

0 10 20 30 40 50

9

10

11

12

13

14

15

16

17

18

aver

age

path

hop

s

average repacing times per node

CCAN

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

Dynamic Convergence

0 20 40 60 80 100

9

10

11

12

13

14

15

16

17

18

aver

age

pat

h ho

ps

average replacing times per node

CCAN

Each data point is the average of 100 queries.

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

Path Hops

64 128 256 512 1024 2048 40960

5

10

15

20

25

30

35

40

Pa

th H

op

s

Node number

CAN CCAN- random replacement CCAN-1 cached long contact CCAN-3 cached long contacts

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

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 nod

e 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 al

so to realize a unique effect with an expected path hops.

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

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.

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

Thank [email protected]