lehrstuhl informatik iii: datenbanksysteme achim landschoof 28. april 2009 strukturierte p2p systeme...

26
Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Strukturierte P2P Systeme Achim Landschoof Betreuerin: Dipl.-Inf. Jessica Müller

Upload: karlmann-schlobohm

Post on 05-Apr-2015

111 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

28. April 2009 Strukturierte P2P Systeme 1

Strukturierte P2P Systeme

Achim LandschoofBetreuerin: Dipl.-Inf. Jessica Müller

Page 2: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 2

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Übersicht

Motivation strukturiert vs. unstrukturiert Hashing Chord BATON P-Grid CAN Fazit

Page 3: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 3

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Motivation

effizientes Routing effiziente Suche garantierte Aufwandsabschätzungen durch Ausnutzung der Netzstruktur

Page 4: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 4

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

strukturiert vs. unstrukturiert

unstrukturiert Verteilung Key-Daten-Tupel unabhängig von

Topologie Suche mittels Flooding oder Random-Walks

strukturiert Topologie bestimmt Verteilung gezielte Suche Verweise vorgegeben

Page 5: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 5

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Hashing

Eingabe beliebiger Länge wird auf Ausgabe fester Länge abgebildet

Jeder Hashwert möglich Ausgabe sieht aus wie zufällig kleine Änderung an Eingabe führt zu völlig

neuem Hashwert Alternativ ordnungserhaltende Hashfunktion

Page 6: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 6

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Chord

Ring Topologie Hashfunktion für

Knoten und Keys Zuordnung im

Uhrzeigersinn (Nachfolger)

Knoten

Keys

Page 7: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 7

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Fingertabelle

Bitlänge der Hashwerte: m Maximal m Einträge in Fingertabelle Eintrag i: successor(n + 2i-1)

Page 8: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 8

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Routing

Suche nach Key 11

Startet bei N15

N15

N2

N3

N8

N6N10

N9

N13

lookup(11)

N11

Page 9: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 9

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Routing

Fingertabelle N15:

N15

N2

N3

N8

N6N10

N9

N13

lookup(11)

N11

i n+2i-1 succ(n+2i-1)

1 0 N2

2 1 N2

3 3 N3

4 7 N8

Page 10: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 10

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Routing

Fingertabelle N8:

N15

N2

N3

N8

N6N10

N9

N13

lookup(11)

i n+2i-1 succ(n+2i-1)

1 9 N9

2 10 N10

3 12 N13

4 0 N2N11

Page 11: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 11

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Routing

Fingertabelle N10:

N15

N2

N3

N8

N6N10

N9

N13

lookup(11)

i n+2i-1 succ(n+2i-1)

1 11 N11

2 12 N13

3 14 N15

4 2 N2N11

Page 12: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 12

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Join

Berechne Hash Beliebigen

Knoten n kontaktieren

n bestimmt Fingertabelle

N15

N2

N3

N8

N6N10

N9

N13

join(5)

N11

Page 13: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 13

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

BATON

Balanced Tree Structure for Peer-to-Peer Networks

balancierter Binärbaum Knoten identifiziert durch Level und Nummer Nummer = Position innerhalb Level

Page 14: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 14

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

BATON Baum

h i j k l m n o

d e f g

b c

aLevel 0

Level 1

Level 2

Level 3

Knoten j: Level = 3, Nummer = 3, Vater = e, linkesKind = null, rechtesKind = r, linkerNachbar = b, rechterNachbar = rlinke Routing Tabelle:

Knoten linkeKind

rechteKind

untereGrenze

obereGrenze

1 i null null ilower

iupper

2 h p q hlower

hupper

Knoten linkeKind

rechteKind

untereGrenze

obereGrenze

1 k null null klower

kupper

2 l null null llower

lupper

3 n s t nlower

nupper

rechte Routing Tabelle:

p q r s t

Page 15: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 15

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Join

h i j k l m n o

d e f g

b c

a

q r s

t

tp

Page 16: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 16

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Routing

h i j k l m n o

d e f g

b c

a

p q r s t

Page 17: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 17

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Bereichssuche

Wie normale Suche, aber nach einem Knoten dessen Bereich sich mit dem Suchbereich schneidet

Von gefundenem Knoten aus über Nachbarschaftsverweise

Page 18: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 18

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

P-Grid

1 32 4 65

00

0 1

1101 10

1:600:1

1:500:1

0:211:5

1:401:3

0:310:4

0:210:4Datenpräfi

x00

Datenpräfix

01

Datenpräfix

01

Datenpräfix

10

Datenpräfix

11

Datenpräfix

11

XP:xP

Knoten XRoutingtabelle Präfix P zu Knoten x

Daten mit Präfix P

Routing von Knoten 6 zu Präfix 00

Page 19: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 19

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

P-Grid

1 32 4 65

00

0 1

1101 10

1:600:1

1:500:1

0:211:5

1:401:3

0:310:4

0:210:4Datenpräfi

x00

Datenpräfix

01

Datenpräfix

01

Datenpräfix

10

Datenpräfix

11

Datenpräfix

11

XP:xP

Knoten XRoutingtabelle Präfix P zu Knoten x

Daten mit Präfix P

Bereichssuche von Knoten 1 zu Präfix 01 bis 10 über Nachbarschaftskanten

Page 20: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 20

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

P-Grid

1 32 4 65

00

0 1

1101 10

1:600:1

1:500:1

0:211:5

1:401:3

0:310:4

0:210:4Datenpräfi

x00

Datenpräfix

01

Datenpräfix

01

Datenpräfix

10

Datenpräfix

11

Datenpräfix

11

XP:xP

Knoten XRoutingtabelle Präfix P zu Knoten x

Daten mit Präfix P

Bereichssuche von Knoten 1 zu Präfix 01 bis 10 mit shower Algorithmus

Page 21: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 21

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

CAN (0,1)

(0,0) (1,0)

(1,1)

(0; 0; 0,25; 0,25)

(0,25; 0;0,5; 0,25)

(0,5; 0; 0,75; 0,5)

(0; 0,75; 0,5; 1)

(0; 0,25;0,5; 0,5)

(0,5; 0,5;0,75; 0,75)

(0,5; 0,75;0,75;1)

(0,75; 0,5;1; 1)

(0,75; 0;1; 0,5)

(0; 0,5; 0,5; 0,75)

Page 22: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 22

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Fazit

Systeme haben unterschiedliche Stärken Wahl hängt vom Einsatzgebiet ab

Chord BATON P-Grid CAN

Verweise logN logN logN d

Join logN logN logN dN1/d+dlogN

einfache Suche

logN logN logN dN1/d

Bereichssuche X * logN logN + Y logN + Y YdN1/d

N: Anzahl Knoten, X: Anzahl Keys bei BereichssucheY: Anzahl Knoten auf denen sich die Keys befinden, d: Anzahl Dimensionen

Page 23: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 23

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Fazit

CAN unabhängig von der Größe des Netzes Chord und P-Grid soviel wie Hash lang BATON ungefähr 6*log(N/4)

Chord BATON P-Grid CAN

Verweise logN logN logN d

Join logN logN logN dN1/d+dlogN

einfache Suche

logN logN logN dN1/d

Bereichssuche X * logN logN + Y logN + Y YdN1/d

N: Anzahl Knoten, X: Anzahl Keys bei BereichssucheY: Anzahl Knoten auf denen sich die Keys befinden, d: Anzahl Dimensionen

Page 24: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 24

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Fazit

Chord am schnellsten BATON etwas langsamer als Chord P-Grid im worst case am langsamsten CAN im Schnitt am langsamsten

Chord BATON P-Grid CAN

Verweise logN logN logN d

Join logN logN logN dN1/d+dlogN

einfache Suche

logN logN logN dN1/d

Bereichssuche X * logN logN + Y logN + Y YdN1/d

N: Anzahl Knoten, X: Anzahl Keys bei BereichssucheY: Anzahl Knoten auf denen sich die Keys befinden, d: Anzahl Dimensionen

Page 25: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 25

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Fazit

BATON und P-Grid unterstützen von sich aus Chord und CAN mit geeigneten

Hashfunktionen

Chord BATON P-Grid CAN

Verweise logN logN logN d

Join logN logN logN dN1/d+dlogN

einfache Suche

logN logN logN dN1/d

Bereichssuche X * logN logN + Y logN + Y YdN1/d

N: Anzahl Knoten, X: Anzahl Keys bei BereichssucheY: Anzahl Knoten auf denen sich die Keys befinden, d: Anzahl Dimensionen

Page 26: Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof 28. April 2009 Strukturierte P2P Systeme 1 Achim Landschoof Betreuerin: Dipl.-Inf. Jessica

28. April 2009 Strukturierte P2P Systeme 26

Lehrstuhl Informatik III: Datenbanksysteme Achim Landschoof

Vielen Dank für´s Zuhören