SlideShare une entreprise Scribd logo
1  sur  84
Lecture 5
Interest Management
     22 February 2010




                        1
aka
Relevance Filtering


                      2
aka
Data Distribution
  Management


                    3
Idea: only need to update
  another player p if the
   update matters to p.


                            4
Aura / Area-of-Interest




                          5
Update of p matters to q if the
  auras of p and q intersect.




                                  6
Foci
(what a player can see)




                          7
Nimbi
(where a player can be seen)




                               8
Update of p matters to q if the
foci of p intersects nimbi of q.




                                   9
need not be binary:
can generalize to multi-
    level of interest
 depending on distance


                           10
Communication Abstraction




                            11
Multicast: send a message
 to a set of subscribers



                            12
Group: a channel to
 publish messages



                      13
A client can subscribe to/
join a group to start receiving
  messages from that group.



                                  14
A client can unsubscribe
from/leave a group to stop
receiving messages from that
            group.


                               15
Anyone can send a
message to a group (need
  not be a subscriber).



                           16
a group   a subscriber




                         17
Distance-based
Interest Management


                      18
Update of p matters to q if the p
and q are within certain distance
        from each other




                                    19
Calculating a distance-based
     AoI can be costly.



                               20
Cell-based
Interest Management


                      21
Idea: approximate use bounding boxes




                                       22
or approximate using cells




                             23
Each cell is a group. A subscriber
  can subscribe to multiple cells. A group
       can have multiple publishers.



a group




                                             24
Large cell: Redundant messages.
Small cell: Large management overhead.




                                         25
The white player will receive many
messages he/she is not interested in.




                                        26
Idea: we can dynamically partition the
  cells into smaller ones as needed.




                                         27
Visibility-Based
Interest Management


                      28
29
Ideally one should consider occlusion
    (we focus on visual occlusion)




                                        30
A player P is interested in
 (events generated by) an
entity Q if P can see Q, and
        Q is near P.


                               31
Ideally one should consider occlusion
    (we focus on visual occlusion)




                                        32
Ray Visibility
Interest Management



                      33
Object-to-Object
Visibility

1. Expensive
2. Frequent re-calculations.

but gives exact visibility.
                               34
A player P is interested in
(events generated by) an
 entity Q if P can see Q’s
   cell, and Q is near P.


                              35
Object-to-Cell Visibility




                            36
Object-to-Cell
Visibility

1. Less expensive
2. Less frequent re-calculations
3. Less accurate

                                   37
When player moves,
still need to recompute
        visible cells.


                          38
A player P is interested in
 (events generated by) an
entity Q if P’s cell can “see”
  Q’s cell, and Q is near P.


                                 39
i.e., there exists in a point
  in P’s cell that can see a
 point in Q’s cell, and Q is
            near P.


                                40
Cell-to-Cell Visibility




                          41
Cell-to-Cell Visibility

1. Much Less expensive
2. Calculate once!

but even less accurate.

                          42
Computing
Cell-to-Cell Visibility


                          43
Check if there exist two points, one in each
cell, that can see each other (can draw a line
      without passing through occlusion)




                                                 44
Trivial case: if two cells are adjacent and the
   boundary is not completely occluded.




                                                  45
Build a graph of cells -- connect two vertices
if they share a boundary and is visible to each other.




                                                         46
if two cells are not-adjacent, then for them to
be visible to each other, there should exists a
           path between them, and ...




                                                  47
consider the non-occluded boundaries along
                  path..




                                             48
The set of points on the left L and right R can
            be separated by a line.




                                                  49
The set of points on the left L and right R can
            be separated by a line.




                                                  50
Linearly Separable Point Sets




no                              yes
                                      51
We can model this problem as a set
       of linear equations.




               (x1,y1)
                              ax + by - c = 0

                         (x2,y2)




                                                52
Find a solution (a, b, c) for the following:

ax1 + by1 - c > 0 for all (x1,y1) in L
ax2 + by2 - c < 0 for all (x2,y2) in R

The line that separates is ax + by - c = 0

                  (x1,y1)
                                 ax + by - c = 0

                            (x2,y2)

                                                   53
We can break into smaller cells
if occlusion is not aligned with boundary of cells.




                                                      54
(Irregular) triangular cells can adapt to
       any polygonal occlusions.




                                            55
Note: Rendering
engine usually computes
visibility information
which we may be able to
reuse in the Interest
Management module.

                          56
Generalized Interest
   Management


                       57
Example: Interested in
(i) objects around avatar
(ii) buildings in a region
(iii) the opponent’s avatar


                              58
Subscription can be
based on any attributes
(not just position)


                          59
We can view each
object as occupying a
multidimensional space
(each attribute is a
dimension)

                         60
A subscription specifies
a region in the same
space.


                          61
When an update region
of an entity P intersects
the subscription region
of entity Q, updates of P is
sent to Q.


                               62
How to test if two regions
overlap in k-dimensional
space?



                             63
Naive approach: O(nm)
for n update region and m
subscription region.



                            64
Dimensional Reduction

If two regions overlap, then
they overlap in each of the
individual k dimension.


                               65
66
How to test if two intervals
overlap?



                               67
Step 1: Sort all end points
and put into a list L



                              68
69
Step 2: Scan from left to
right. Remember all active
subscription regions S and all
active update regions U.


                                 70
S1




     Active Subscriptions: S1

                                71
S2

S1




      Active Subscriptions: S1, S2

                                     72
S2

S1

          U1




               Active Subscriptions: S1, S2
               Active Update Regions: U1
                                              73
We can determine the
overlaps when we process
the endpoint of a region.



                            74
S2

S1

          U1



                Active Subscriptions: S2
               Active Update Regions: U1
                   S1 overlaps U1


                                           75
S2

S1

          U1



               Active Subscriptions: none
               Active Update Regions: U1
                   S2 overlaps U1


                                            76
77
If we encounter the endpoint of a
subscription region, then it overlaps
with all active update regions.

If it is the endpoint of an update
region, then it overlaps with all
active subscription region.


                                        78
Sort-based approach:
O(n log n + m log m)
	

 for sorting

O(n + m)
	

 to scan

                       79
Note: storing overlap
information still takes O(nm)
since in the worst case there
are O(nm) overlaps.


                                80
Temporal Coherence

Changes to value of an
attribute is small between
two consecutive time steps.


                              81
Sort-based approach:
O(n log n + m log m)
	

 to pre-sort the data
O(n + m)
	

 for sorting (insertion sort)
O(n + m)
	

 to scan
                                   82
In fact, only regions that are
swapped during insertion
sort need to update their
overlap set.


                                 83
84

Contenu connexe

En vedette

CS4344 09/10 Lecture 3: Dead Reckoning and Local Perception Filter
CS4344 09/10 Lecture 3: Dead Reckoning and Local Perception FilterCS4344 09/10 Lecture 3: Dead Reckoning and Local Perception Filter
CS4344 09/10 Lecture 3: Dead Reckoning and Local Perception FilterWei Tsang Ooi
 
CS4344 09/10 Lecture 9: Characteristics of Networked Game Traffic
CS4344 09/10 Lecture 9: Characteristics of Networked Game TrafficCS4344 09/10 Lecture 9: Characteristics of Networked Game Traffic
CS4344 09/10 Lecture 9: Characteristics of Networked Game TrafficWei Tsang Ooi
 
CS4344 09/10 Lecture 8: Hybrid Architecture
CS4344 09/10 Lecture 8: Hybrid ArchitectureCS4344 09/10 Lecture 8: Hybrid Architecture
CS4344 09/10 Lecture 8: Hybrid ArchitectureWei Tsang Ooi
 
CS5229 09/10 Lecture 10: Internet Routing
CS5229 09/10 Lecture 10: Internet RoutingCS5229 09/10 Lecture 10: Internet Routing
CS5229 09/10 Lecture 10: Internet RoutingWei Tsang Ooi
 
Lecture 2: Congestion Control and Avoidance
Lecture 2: Congestion Control and AvoidanceLecture 2: Congestion Control and Avoidance
Lecture 2: Congestion Control and AvoidanceWei Tsang Ooi
 
Lecture 4: TCP and TFRC
Lecture 4: TCP and TFRCLecture 4: TCP and TFRC
Lecture 4: TCP and TFRCWei Tsang Ooi
 
CS4344 09/10 Lecture 10: Transport Protocol for Networked Games
CS4344 09/10 Lecture 10: Transport Protocol for Networked GamesCS4344 09/10 Lecture 10: Transport Protocol for Networked Games
CS4344 09/10 Lecture 10: Transport Protocol for Networked GamesWei Tsang Ooi
 
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcpsamarai_apoc
 
CS4344 09/10 Lecture 6: P2P Synchronization
CS4344 09/10 Lecture 6: P2P SynchronizationCS4344 09/10 Lecture 6: P2P Synchronization
CS4344 09/10 Lecture 6: P2P SynchronizationWei Tsang Ooi
 

En vedette (12)

CS4344 09/10 Lecture 3: Dead Reckoning and Local Perception Filter
CS4344 09/10 Lecture 3: Dead Reckoning and Local Perception FilterCS4344 09/10 Lecture 3: Dead Reckoning and Local Perception Filter
CS4344 09/10 Lecture 3: Dead Reckoning and Local Perception Filter
 
CS4344 09/10 Lecture 9: Characteristics of Networked Game Traffic
CS4344 09/10 Lecture 9: Characteristics of Networked Game TrafficCS4344 09/10 Lecture 9: Characteristics of Networked Game Traffic
CS4344 09/10 Lecture 9: Characteristics of Networked Game Traffic
 
CS4344 09/10 Lecture 8: Hybrid Architecture
CS4344 09/10 Lecture 8: Hybrid ArchitectureCS4344 09/10 Lecture 8: Hybrid Architecture
CS4344 09/10 Lecture 8: Hybrid Architecture
 
CS5229 09/10 Lecture 10: Internet Routing
CS5229 09/10 Lecture 10: Internet RoutingCS5229 09/10 Lecture 10: Internet Routing
CS5229 09/10 Lecture 10: Internet Routing
 
Lecture 2: Congestion Control and Avoidance
Lecture 2: Congestion Control and AvoidanceLecture 2: Congestion Control and Avoidance
Lecture 2: Congestion Control and Avoidance
 
Lecture 4: TCP and TFRC
Lecture 4: TCP and TFRCLecture 4: TCP and TFRC
Lecture 4: TCP and TFRC
 
Analysis of TCP variants
Analysis of TCP variantsAnalysis of TCP variants
Analysis of TCP variants
 
Lecture 5: RED
Lecture 5: REDLecture 5: RED
Lecture 5: RED
 
Cubic
CubicCubic
Cubic
 
CS4344 09/10 Lecture 10: Transport Protocol for Networked Games
CS4344 09/10 Lecture 10: Transport Protocol for Networked GamesCS4344 09/10 Lecture 10: Transport Protocol for Networked Games
CS4344 09/10 Lecture 10: Transport Protocol for Networked Games
 
Congestion control in tcp
Congestion control in tcpCongestion control in tcp
Congestion control in tcp
 
CS4344 09/10 Lecture 6: P2P Synchronization
CS4344 09/10 Lecture 6: P2P SynchronizationCS4344 09/10 Lecture 6: P2P Synchronization
CS4344 09/10 Lecture 6: P2P Synchronization
 

Plus de Wei Tsang Ooi

The Computer Science behind YouTube
The Computer Science behind YouTubeThe Computer Science behind YouTube
The Computer Science behind YouTubeWei Tsang Ooi
 
CS5229 09/10 Lecture 11: DNS
CS5229 09/10 Lecture 11: DNSCS5229 09/10 Lecture 11: DNS
CS5229 09/10 Lecture 11: DNSWei Tsang Ooi
 
Lecture 0: Introduction to CS5229
Lecture 0: Introduction to CS5229Lecture 0: Introduction to CS5229
Lecture 0: Introduction to CS5229Wei Tsang Ooi
 
Lecture 1: Design Principles of the Internet
Lecture 1: Design Principles of the InternetLecture 1: Design Principles of the Internet
Lecture 1: Design Principles of the InternetWei Tsang Ooi
 
CS4344 Lecture 8: Hybrid Architecture
CS4344 Lecture 8: Hybrid ArchitectureCS4344 Lecture 8: Hybrid Architecture
CS4344 Lecture 8: Hybrid ArchitectureWei Tsang Ooi
 
CS4344 Lecture 10: Player Dynamics
CS4344 Lecture 10: Player DynamicsCS4344 Lecture 10: Player Dynamics
CS4344 Lecture 10: Player DynamicsWei Tsang Ooi
 
CS4344 Lecture 9: Traffic Analysis
CS4344 Lecture 9: Traffic AnalysisCS4344 Lecture 9: Traffic Analysis
CS4344 Lecture 9: Traffic AnalysisWei Tsang Ooi
 
CS5229 Lecture 9: Internet Topology
CS5229 Lecture 9: Internet TopologyCS5229 Lecture 9: Internet Topology
CS5229 Lecture 9: Internet TopologyWei Tsang Ooi
 
CS5229 Lecture 9: Simulating the Internet
CS5229 Lecture 9: Simulating the InternetCS5229 Lecture 9: Simulating the Internet
CS5229 Lecture 9: Simulating the InternetWei Tsang Ooi
 
CS5229 Lecture 7: Queue Management
CS5229 Lecture 7: Queue ManagementCS5229 Lecture 7: Queue Management
CS5229 Lecture 7: Queue ManagementWei Tsang Ooi
 
Lecture 7: DHT and P2P Games
Lecture 7: DHT and P2P GamesLecture 7: DHT and P2P Games
Lecture 7: DHT and P2P GamesWei Tsang Ooi
 
CS4344 Lecture 6: Interest Management in P2P Architecture
CS4344 Lecture 6: Interest Management in P2P ArchitectureCS4344 Lecture 6: Interest Management in P2P Architecture
CS4344 Lecture 6: Interest Management in P2P ArchitectureWei Tsang Ooi
 
CS5229 Lecture 5: TCP and TRFC
CS5229 Lecture 5: TCP and TRFCCS5229 Lecture 5: TCP and TRFC
CS5229 Lecture 5: TCP and TRFCWei Tsang Ooi
 
CS4344 Lecture 5: Synchronization and Cheating in P2P Games
CS4344 Lecture 5: Synchronization and Cheating in P2P GamesCS4344 Lecture 5: Synchronization and Cheating in P2P Games
CS4344 Lecture 5: Synchronization and Cheating in P2P GamesWei Tsang Ooi
 

Plus de Wei Tsang Ooi (15)

CS2106 Tutorial 2
CS2106 Tutorial 2CS2106 Tutorial 2
CS2106 Tutorial 2
 
The Computer Science behind YouTube
The Computer Science behind YouTubeThe Computer Science behind YouTube
The Computer Science behind YouTube
 
CS5229 09/10 Lecture 11: DNS
CS5229 09/10 Lecture 11: DNSCS5229 09/10 Lecture 11: DNS
CS5229 09/10 Lecture 11: DNS
 
Lecture 0: Introduction to CS5229
Lecture 0: Introduction to CS5229Lecture 0: Introduction to CS5229
Lecture 0: Introduction to CS5229
 
Lecture 1: Design Principles of the Internet
Lecture 1: Design Principles of the InternetLecture 1: Design Principles of the Internet
Lecture 1: Design Principles of the Internet
 
CS4344 Lecture 8: Hybrid Architecture
CS4344 Lecture 8: Hybrid ArchitectureCS4344 Lecture 8: Hybrid Architecture
CS4344 Lecture 8: Hybrid Architecture
 
CS4344 Lecture 10: Player Dynamics
CS4344 Lecture 10: Player DynamicsCS4344 Lecture 10: Player Dynamics
CS4344 Lecture 10: Player Dynamics
 
CS4344 Lecture 9: Traffic Analysis
CS4344 Lecture 9: Traffic AnalysisCS4344 Lecture 9: Traffic Analysis
CS4344 Lecture 9: Traffic Analysis
 
CS5229 Lecture 9: Internet Topology
CS5229 Lecture 9: Internet TopologyCS5229 Lecture 9: Internet Topology
CS5229 Lecture 9: Internet Topology
 
CS5229 Lecture 9: Simulating the Internet
CS5229 Lecture 9: Simulating the InternetCS5229 Lecture 9: Simulating the Internet
CS5229 Lecture 9: Simulating the Internet
 
CS5229 Lecture 7: Queue Management
CS5229 Lecture 7: Queue ManagementCS5229 Lecture 7: Queue Management
CS5229 Lecture 7: Queue Management
 
Lecture 7: DHT and P2P Games
Lecture 7: DHT and P2P GamesLecture 7: DHT and P2P Games
Lecture 7: DHT and P2P Games
 
CS4344 Lecture 6: Interest Management in P2P Architecture
CS4344 Lecture 6: Interest Management in P2P ArchitectureCS4344 Lecture 6: Interest Management in P2P Architecture
CS4344 Lecture 6: Interest Management in P2P Architecture
 
CS5229 Lecture 5: TCP and TRFC
CS5229 Lecture 5: TCP and TRFCCS5229 Lecture 5: TCP and TRFC
CS5229 Lecture 5: TCP and TRFC
 
CS4344 Lecture 5: Synchronization and Cheating in P2P Games
CS4344 Lecture 5: Synchronization and Cheating in P2P GamesCS4344 Lecture 5: Synchronization and Cheating in P2P Games
CS4344 Lecture 5: Synchronization and Cheating in P2P Games
 

Cs4344 09/10 Lecture 5: Interest Management