Presentation is loading. Please wait.

Presentation is loading. Please wait.

Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 1 Principles of Reliable Distributed Systems Recitation.

Similar presentations


Presentation on theme: "Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 1 Principles of Reliable Distributed Systems Recitation."— Presentation transcript:

1 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 1 Principles of Reliable Distributed Systems Recitation 2 Efficient Broadcast in Structured P2P Networks Spring 2007 Alex Shraer

2 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 2 Last on 046272 Chord and other P2P networks Reliable/Fault-Tolerant Broadcast Services

3 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 3 Today’s Recitation “Efficient Broadcast in Structured P2P Networks” –El-Ansary et al. In 2nd International Workshop on Peer-to-Peer Systems (IPTPS '03) –See the web site

4 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 4 Motivation We would like to search the network using arbitrary queries. (Not only key lookups) –“Look for the nodes that hold ‘Kill Bill Vol*’ ” –Statistical gathering queries –notifications A possible solution – broadcast the query to all the nodes in the network –How do we do it efficiently?

5 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 5 Simple Solution Gnutella: Use a random connectivity graph and flood the query to all the neighbors –We can send arbitrary queries but, –Hit guarantees – Low, –Traffic – Enormous (not scalable). We would like to do better –Use a structured overlay network.

6 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 6 Problem Definition Given an overlay network constructed by a P2P DHT system, find an efficient algorithm for broadcasting messages. –The algorithm should not depend on global knowledge of membership and, –should be of equal cost for any member in the system. What’s the most efficient number of messages needed to broadcast a message to all the nodes?

7 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 7 Simple Solution (Take II) Ring traversal –Number of messages: N-1 (efficient) –Time: N-1 InitBroadcast

8 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 8 Another look at Chord Chord actually performs a binary search Look at a fully-populated 8-node network:

9 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 9 Constructing a spanning tree

10 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 10 Taking Advantage of Structure Gnutella-like Broadcast –We know that setting TTL = log 2 (N) guarantees flooding to all nodes. Efficient Broadcast –Based on the spanning tree

11 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 11 Initiating a Broadcast Notation:

12 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 12 Processing a Broadcast NewLimit := min{Finger[i+1], Limit}

13 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 13 Properties Coverage of all nodes. No redundancy. These properties are identical to the ring traversal algorithm. –Why use this algorithm? Is this algorithm fault tolerant?

14 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 14 Simulation Results

15 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 15 SkipLists – a reminder Borrowed from CS 236218 (Amir Rubinstein)

16 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 16 רשימת דילוגים – skip list Random skip list מבנה נתונים המאפשר חיפוש, הכנסה והוצאה של איברים בזמן לוגריתמי בממוצע. Deterministic skip list מבנה נתונים המאפשר חיפוש, הכנסה והוצאה של איברים בזמן לוגריתמי במקרה הגרוע. בדומה לעץ חיפוש בינארי (לא מאוזן) בדומה לעץ חיפוש בינארי מאוזן

17 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 17 דוגמת הכנסה insert(35) המצב ההתחלתי: המצב הסופי: כאשר בכל ההגרלות יצאה התשובה "כן" להוספת איבר Random Skip List

18 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 18 דוגמת הוצאה delete(15)

19 Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 19 תכונות של רשימת דילוגים אקראית אם ההסתברות להוספת צומת היא p, אז כל צומת יופיע בממוצע 1/(1-p) פעמים. עבור p=0.5 כל צומת יופיע בממוצע פעמיים  יהיו בממוצע 2n צמתים. מספר הרמות הממוצע הינו. האורך הממוצע של מסלול חיפוש L מקיים: עבור p=0.5: מהם היתרונות של רשימת דילוגים רנדומלית? - מימוש יחסית פשוט (אין גלגולים, איחוד ופיצול צמתים...) - אלגוריתם רנדומלי: לא תלוי בהתפלגות הקלט או במהלכים של "יריב".


Download ppt "Eddie Bortnikov/Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring 2006 1 Principles of Reliable Distributed Systems Recitation."

Similar presentations


Ads by Google