SlideShare a Scribd company logo
Lecture 7
    Peer-to-Peer
Interest Management
      8 March 2010



                      1
Point-to-Point
 Architecture


      2
                 2
Problem:
Communication between
  every pair of peers


          3
                        3
Idea (old): A peer p only
needs to communicate
with another peer q
if p is relevant to q

            4
                            4
Recall: In C/S Architecture, the
server has global information
and decide who is relevant to
who.


               5
                                   5
Problem: No global
information in P2P
architecture.


           6
                     6
Naive Solution: Every
peer keeps global information
about all other peers and
make individual decision.


              7
                                7
Maintaining global
information is expensive
(and that’s what we want
to avoid in the first place!)


              8
                               8
Smarter solution:
exchange position, then
decide when should the
next position exchange be.


              9
                             9
Idea: Assume B is static. If
A knows B’s position, A can
compute the region which is
irrelevant to B. Need not
update B if A moves within
that region.

              10
                               10
what if B moves?




       11
                   11
It still works if B also knows A
position and computes the
region that is irrelevant to A.



                12
                                   12
Position exchanges occur once
initially, and when a player
moves outside of its irrelevant
region wrt another player.


               13
                                  13
Frontier Sets
cell-based, visibility-based IM



               14
                                  14
Previously, we learnt how to
compute cell-to-cell visibility.



               15
                                   15
Frontier for cells X and Y
       consists of
  two sets FXY and FYX


            16
                             16
No cell in FXY is visible from
a cell in FYX, and vice versa.



              17
                                 17
FXY and FYX are disjoint
if X and Y are not mutually visible.




                 18
                                       18
FXY and FYX are empty
if X and Y are mutually visible.




               19
                                   19
Suppose X and Y are not
  mutually visible, then
   a simple frontier is

 FXY = {X}        FYX = {Y}

(many others are possible)
             20
                              20
A   B    C


D   E    F


G   H    I



    21
             21
A   B    C


D   E    F


G   H    I



    22
             22
A   B    C


D   E    F


G   H    I



    23
             23
A   B    C


D   E    F


G   H    I



    24
             24
NOT a frontier for A and I (D is visible from B).


            A           B         C


            D           E         F


             G         H          I



                         25
                                                    25
Position exchanges occur once
initially, and when a player
moves outside of its irrelevant
region wrt another player.


               26
                                  26
Initialize:
Let player P be in cell X
For each player Q
    Let cell of Q be Y
	

 Compute FXY (or simply FQ)


               27
                                 27
Move to new cell:
Let X be new cell
For each player Q
	

 If X not in FQ
	

 Send location to Q



               28
                         28
Receive Update:
(location from Q)
Send location to Q
Recompute FQ


             29
                     29
Update is triggered.


A        B         C


D        E             F


G        H             I



          30
                           30
New Frontier.


A         B         C


D         E         F


G        H          I



           31
                        31
Update triggered.


A           B           C


D           E           F


G          H            I



             32
                            32
New frontier (empty since E can see G)


        A         B         C


        D         E         F


        G         H         I



                   33
                                         33
How to compute frontier?




           34
                           34
A good frontier is as large as
 possible, with two almost
      equal-size sets.



              35
                                 35
Build a visibility graph. Cells are vertices. Two cells are
connected by an edge if they are visible to each other
         (EVEN if they don’t share a boundary)


                 A           B         C


                 D           E          F


                 G          H           I

                              36
                                                              36
Let dist(X,Y) be the shortest
distance between two cells X
 and Y on the visibility graph.



               37
                                  37
0       1        2
    A       B    C

2       1        2
    D       E     F

2       3        3
    G       H        I

            38
                         38
Theorem
FXY = { i | dist(X,i) <= dist(Y,i) - 1}
FYX = { j | dist(Y,j) < dist(X,j) - 1}

are valid frontiers.


                    39
                                          39
0       3   1        3   2 3
    A           B        C

2       2   1        2   2 4
    D           E         F

2       1   3        1   3 0
    G           H        I

                40
                               40
0       3   1        3   2 3
    A           B        C

2       2   1        2   2 4
    D           E         F

2       1   3        1   3 0
    G           H        I

                41
                               41
0       3   1        3   2 3
    A           B        C

2       2   1        2   2 4
    D           E         F

2       1   3        1   3 0
    G           H        I

                42
                               42
A   B    C


D   E    F


G   H    I



    43
             43
Theorem
FXY = { i | dist(X,i) <= dist(Y,i) - 1}
FYX = { j | dist(Y,j) < dist(X,j) - 1}

are valid frontiers.


                    44
                                          44
FXY = { i |dist(X,i) <= dist(Y,i) - 1}
FYX = { j |dist(Y,j) < dist(X,j) - 1}


Proof (by contradiction)
Suppose there are two cells, C in
FXY and D in FYX, that can see each
other.

                          45
                                         45
FXY = { i |dist(X,i) <= dist(Y,i) - 1}
FYX = { j |dist(Y,j) < dist(X,j) - 1}


dist(X,C) <= dist(Y,C) - 1
dist(Y,D) < dist(X,D) - 1
dist(C,D) = dist(D,C) = 1

                          46
                                         46
dist(X,C) <= dist(Y,C) - 1
dist(Y,D) < dist(X,D) - 1
dist(C,D) = dist(D,C) = 1

We also know that
dist(X,D) <= dist(X,C) + dist(C,D)
dist(Y,C) <= dist(Y,D) + dist(D,C)

                        47
                                     47
1. dist(X,C) <= dist(Y,C) - 1
2. dist(Y,D) < dist(X,D) - 1
3. dist(C,D) = 1
4. dist(X,D) <= dist(X,C) + dist(C,D)
5. dist(Y,C) <= dist(Y,D) + dist(D,C)


From 4, 1, and 3:
dist(X,D) 	

<= dist(Y,C) - 1 + 1
From 5:
dist(X,D) <= dist(Y,D) + 1
                        48
                                        48
1. dist(X,C) <= dist(Y,C) - 1
2. dist(Y,D) < dist(X,D) - 1
3. dist(C,D) = 1
4. dist(X,D) <= dist(X,C) + dist(C,D)
5. dist(Y,C) <= dist(Y,D) + dist(D,C)


We have
	

 dist(X,D) <= dist(Y,D) + 1
Which contradict 2
	

 dist(X,D) > dist(Y,D) + 1
                        49
                                        49
How good is the idea?

(How many messages can we save
    by using Frontier Sets?)



              50
                                 50
q2dm3     q2dm4   q2dm8

  Max dist()    4         5       8
Num of cells   666 1902 966

                    51
                                         51
Frontier Density:
% of player-pairs with
non-empty frontiers.


            52
                         52
q2dm3        q2dm4   q2dm8
Frontier
Density    83.9 93.0 84.2


                   53
                                        53
Frontier Size:
% of cells in the frontier
on average


             54
                             54
q2dm3        q2dm4   q2dm8
Frontier
    Size   38.3% 67.3% 68.2%


                   55
                                        55
Compare with
1. Naive P2P
2. Perfect P2P


         56
                 56
Naive P2P
Always send update to
15 other players.


           57
                        57
Perfect P2P
Hypothetical protocol
that sends messages
only to visible players.

             58
                           58
Number of messages per frame per player.


           q2dm3           q2dm4     q2dm8

   NPP       15            15.7      14.4
    PPP      3.7           1.9        4.2
Frontier     5.4           2.6        5.9
                      59
                                              59
Space Complexity
Let N be the number of cells. If
we precompute Frontier for
every pair of cells, we need
           O(N       3)
space.
                60
                                   60
If we store visibility graph and
compute frontier as needed,
we only need
           O(N       2)
space.

                 61
                                   61
Frontier Sets
cell-based, visibility-based IM



               62
                                  62
Limitations


     63
              63
Works badly if there’s
little occlusion in the
     virtual world.

           64
                          64
Still need to
exchange locations
 with every other
players occasionally.

          65
                        65
Frontier Sets
cell-based, visibility-based IM



               66
                                  66
Voronoi Overlay Network:
Aura-based Interest Management



             67
                                 67
Diagrams and plots in the
 sections are taken from
  presentation slides by
Shun-yun Hu, available on
     http://vast.sf.net


          68
                            68
Keep a list of AOI-neighbors and
exchange messages with AOI-neighbors.




                  69
                                        69
Q: How to initialize AOI-neighbors?




                 70
                                      70
Q: How to update AOI-neighbors?




               71
                                  71
Problem: No global
information in P2P
architecture.


           72
                     72
Idea: Find closest node and
   ask for introductions




             73
                              73
Idea: New AOI-neighbors will likely be
neighbors of my existing AOI-neighbors.




                   74
                                          74
Challenge: Need to discover new neighbors
   even if current node has no neighbor




                    75
                                            75
Question: How to find
closest node?


          76
                       76
Every node is in charge of a
region in the virtual world.

The region contains points
closest to the node.

               77
                               77
Voronoi Diagram




       78
                  78
AOI Neighbors:
     Neighbors in AOI




79
                        79
Enclosing
     Neighbors:
     Neighbors in
     adjacent region.

     (may or may not
     be in AOI)




80
                        80
Boundary
     Neighbors:
     Neighbors whose
     region intersect
     with AOI.

     (may or may not
     be in AOI)



81
                        81
Boundary and
     Enclosing
     Neighbor




82
                    82
Regular AOI
     Neighbor:
     Non-boundary
     and non-enclosing
     neighbor in AOI




83
                         83
Unknown nodes
     (not neighbors!)




84
                        84
Type        in AOI?   intersect?   adjacent?

Regular     yes       no           no

Enclosing   maybe     no           yes

Boundary    maybe     yes          no

Enclosing
          maybe       yes          yes
+Boundary

                                               85
A node always
connect to its
enclosing neigbours,
regardless of whether
they are in the AOI.

     86
                        86
A node connects to
exchanges updates
with all neighbors.




    87
                      87
A node maintains
Voronoi of all
neighbors
(regardless of inside
AOI or not)

    88
                        88
Suppose a player X wants to
join. X sends its location to
any node in the system.



               89
                                89
X join request is forwarded to the node
in charge of the region (i.e., closest node
to X), called acceptor.




                   90
                                              90
Forwarding is done greedily
(at every step, forward to neighbor closest to X)




                        91
                                                    91
Acceptor informs the joining node X of its neighbors.
Acceptor, X, and the neighbors update their Voronoi
diagram to include the new node.




                           92
                                                        92
True or false:

Enclosing neighbors of X are
also enclosing neighbors of
acceptor.

                 93
                               93
When X moves, X learns about new
neighbors from the boundary neighbors.




                  94
                                         94
Boundary neighbors’ enclosing neighbors
   may become new neighbors of X.




                  95
                                          95
When a node disconnects,Voronoi diagrams are
updated by the affected nodes. New boundary
        neighbors may be discovered.




                     96
                                               96
Advantages of VON:

Number of connections
depends on size of AOI, not
size of virtual world


              97
                              97
We can bound number of
connections by adjusting AOI
radius (smaller AOI is crowded
area).



              98
                                 98
Advantages of VON:

Maintain a minimal number of
enclosing neighbors when the
world is sparse to ensure
connectivity.

              99
                               99
Advantages of VON:

Boundary neighbors ensure
that new neighbors are
discovered.


             100
                            100
Problems with VON:

Inconsistency may occur (e.g.
with fast moving nodes)


              101
                                101
No rigorous proof

Working on evaluation with
realistic traces



             102
                             102
For now, simulation only

     World Size 1200x1200

         Players 100 to 1000

            AOI 100

Connection Limit 20

      Movement Random Waypoint

        Velocity Constant 5 units /step
                 103
                                          103
Average Transmission per Second

            16
                       basic
            14         dAOI
                       basic (fixed density after 500 nodes)
            12         dAOI (fixed density after 500 nodes)

            10
Size (kb)




             8

             6

             4

             2

             0
                 0      200            400          600        800   1000
                                      Number of Nodes



                                                                            104
Average Neighbor Size
                50
                         connected neighbors (basic)
                45       AOI neighbors (basic)
                40       connected neighbors (dAOI)
                         AOI neighbors (dAOI)
                35
Neighbor Size




                30

                25
                20

                15
                10

                 5
                 0
                     0      200            400         600   800   1000
                                          Number of Nodes




                                                                          105
Observed/Actual AOI Neighbors

                           100.00

                            99.99

                            99.98
Topology Consistency (%)




                            99.97

                            99.96

                            99.95

                            99.94

                            99.93

                            99.92                 basic
                            99.91                 dAOI
                            99.90
                                    100     200     300   400   500     600    700   800   900   1000
                                                             Number of Nodes




                                                                                                        106
actual - observed position (average over all nodes)

                          0.50
                          0.45
                                             basic
                          0.40
 Average Drift Distance




                                             dAOI
                          0.35
                          0.30
                          0.25
                          0.20
                          0.15
                          0.10
                          0.05
                          0.00
                                 100   200   300     400   500     600  700   800   900   1000
                                                        Number of Nodes




                                                                                                 107
Responsive
Consistent
Cheat-Free
   Fair
 Scalable
 Efficient
 Robust
  Simple
             108

More Related Content

PDF
Digital Electronics Question Bank
PDF
Csr2011 june15 11_30_sokolov
PDF
IntrRSCode
PDF
Kvpy sa-2015-ques-sol
PDF
preCalculus: Quiz11D Matrix Applications
PDF
Complexos 1
DOCX
Peperiksaan pertengahan tahun t4 2012 (2)
PPTX
Chapter 5
Digital Electronics Question Bank
Csr2011 june15 11_30_sokolov
IntrRSCode
Kvpy sa-2015-ques-sol
preCalculus: Quiz11D Matrix Applications
Complexos 1
Peperiksaan pertengahan tahun t4 2012 (2)
Chapter 5

What's hot (18)

DOCX
Circle & solid geometry f3
PDF
Naskah Murid Modul 2 Graph Of Functions Ii
PDF
Ec2203 digital electronics questions anna university by www.annaunivedu.org
PPTX
Alg2 lesson 10-1
PDF
009 solid geometry
PDF
Naskah Murid Modul 3 Transformation Iii
PDF
Elliptic Curve Cryptography and Zero Knowledge Proof
PDF
Modulus and argand diagram
PPT
fghdfh
PDF
Number systems and Boolean Reduction
DOC
Digital logic circuits important question and answers for 5 units
DOC
C4 January 2012 QP
PDF
Anfis.rpi04
PPS
Mathematics Keynotes 2
PPTX
CEER 2012 Math Lecture
PDF
F4 10 Angles Of Elevation Dep
PDF
A109211002 switchingtheoryandlogicdesign1
PPTX
Introduction to Elliptic Curve Cryptography
Circle & solid geometry f3
Naskah Murid Modul 2 Graph Of Functions Ii
Ec2203 digital electronics questions anna university by www.annaunivedu.org
Alg2 lesson 10-1
009 solid geometry
Naskah Murid Modul 3 Transformation Iii
Elliptic Curve Cryptography and Zero Knowledge Proof
Modulus and argand diagram
fghdfh
Number systems and Boolean Reduction
Digital logic circuits important question and answers for 5 units
C4 January 2012 QP
Anfis.rpi04
Mathematics Keynotes 2
CEER 2012 Math Lecture
F4 10 Angles Of Elevation Dep
A109211002 switchingtheoryandlogicdesign1
Introduction to Elliptic Curve Cryptography
Ad

Similar to CS4344 09/10 Lecture 7: P2P Interest Management (20)

PDF
Cs4344 09/10 Lecture 5: Interest Management
PPT
PDF
Algorithm chapter 8
PDF
ON FINDING MINIMUM AND MAXIMUM PATH LENGTH IN GRID-BASED WIRELESS NETWORKS
PPT
Advanced Search Techniques
PPT
Mobile communication concepts
PDF
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
PPT
Peer to-peer
PPTX
8 queens problem using back tracking
PPTX
Ad hoc routing
 
PPTX
Short Transitive Signatures For Directed Trees
KEY
Verification with LoLA: 7 Implementation
PPSX
Data Encryption Standard (DES)
PDF
Dijkstra
PDF
Dijkstra's Algorithm
PDF
Dijkstra
PDF
Microsoft Word Hw#2
PPT
6.freq reuse and network planning
PDF
International Journal of Computer Science and Security Volume (3) Issue (4)
PDF
Part4 graph algorithms
Cs4344 09/10 Lecture 5: Interest Management
Algorithm chapter 8
ON FINDING MINIMUM AND MAXIMUM PATH LENGTH IN GRID-BASED WIRELESS NETWORKS
Advanced Search Techniques
Mobile communication concepts
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
Peer to-peer
8 queens problem using back tracking
Ad hoc routing
 
Short Transitive Signatures For Directed Trees
Verification with LoLA: 7 Implementation
Data Encryption Standard (DES)
Dijkstra
Dijkstra's Algorithm
Dijkstra
Microsoft Word Hw#2
6.freq reuse and network planning
International Journal of Computer Science and Security Volume (3) Issue (4)
Part4 graph algorithms
Ad

More from Wei Tsang Ooi (20)

PDF
SIGMM Education Effort Presentation at Business Meeting
PDF
CS2106 Tutorial 2
PDF
The Computer Science behind YouTube
PDF
CS4344 09/10 Lecture 10: Transport Protocol for Networked Games
PDF
CS4344 09/10 Lecture 9: Characteristics of Networked Game Traffic
PDF
CS4344 09/10 Lecture 8: Hybrid Architecture
PDF
CS4344 09/10 Lecture 6: P2P Synchronization
PDF
CS4344 09/10 Lecture 3: Dead Reckoning and Local Perception Filter
PDF
CS4344 09/10 Lecture 2: Consistency
PDF
CS4344 09/10 Lecture 1: Introduction
PDF
CS5229 09/10 Lecture 11: DNS
PDF
CS5229 09/10 Lecture 10: Internet Routing
PDF
CS5229 09/10 Lecture 9: Internet Packet Dynamics
PDF
CS5229 09/10 Lecture 6: Simulation
PDF
Lecture 5: RED
PDF
Lecture 4: TCP and TFRC
PDF
Lecture 2: Congestion Control and Avoidance
PDF
Lecture 0: Introduction to CS5229
PDF
Lecture 1: Design Principles of the Internet
PDF
CS4344 Lecture 8: Hybrid Architecture
SIGMM Education Effort Presentation at Business Meeting
CS2106 Tutorial 2
The Computer Science behind YouTube
CS4344 09/10 Lecture 10: Transport Protocol for Networked Games
CS4344 09/10 Lecture 9: Characteristics of Networked Game Traffic
CS4344 09/10 Lecture 8: Hybrid Architecture
CS4344 09/10 Lecture 6: P2P Synchronization
CS4344 09/10 Lecture 3: Dead Reckoning and Local Perception Filter
CS4344 09/10 Lecture 2: Consistency
CS4344 09/10 Lecture 1: Introduction
CS5229 09/10 Lecture 11: DNS
CS5229 09/10 Lecture 10: Internet Routing
CS5229 09/10 Lecture 9: Internet Packet Dynamics
CS5229 09/10 Lecture 6: Simulation
Lecture 5: RED
Lecture 4: TCP and TFRC
Lecture 2: Congestion Control and Avoidance
Lecture 0: Introduction to CS5229
Lecture 1: Design Principles of the Internet
CS4344 Lecture 8: Hybrid Architecture

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Machine learning based COVID-19 study performance prediction
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
Teaching material agriculture food technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
KodekX | Application Modernization Development
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Encapsulation theory and applications.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
cuic standard and advanced reporting.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
Spectroscopy.pptx food analysis technology
MYSQL Presentation for SQL database connectivity
Machine learning based COVID-19 study performance prediction
The Rise and Fall of 3GPP – Time for a Sabbatical?
Teaching material agriculture food technology
Spectral efficient network and resource selection model in 5G networks
KodekX | Application Modernization Development
Building Integrated photovoltaic BIPV_UPV.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Encapsulation theory and applications.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
cuic standard and advanced reporting.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Dropbox Q2 2025 Financial Results & Investor Presentation
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Review of recent advances in non-invasive hemoglobin estimation
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Digital-Transformation-Roadmap-for-Companies.pptx
Chapter 3 Spatial Domain Image Processing.pdf
NewMind AI Weekly Chronicles - August'25 Week I

CS4344 09/10 Lecture 7: P2P Interest Management