96
Interest Management 1

Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Interest Management

1

Page 2: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Relevance Filtering

2

Page 3: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

3

Page 4: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Aura / Area-of-Interest

4

Page 5: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

5

Page 6: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Foci (what a player can see)

6

Page 7: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Nimbi (where a player can be seen)

7

Page 8: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

8

Page 9: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Calculating aura/foci/nimbi can be costly.

9

Page 10: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Idea: approximate use bounding boxes

10

Page 11: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

or approximate using cells

11

Page 12: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

12

Page 13: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

13

Page 14: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

14

Page 15: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Generalization: an entity may specify any other events/entity it is interested in.

15

Page 16: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Communication Abstraction

16

Page 17: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Multicast: send a message to a set of subscribers

17

Page 18: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Group: a channel to publish messages

18

Page 19: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

A client can subscribe to/join a group to start receiving

messages from that group.

19

Page 20: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

group.

20

Page 21: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Anyone can send a message to a group (need

not be a subscriber).

21

Page 22: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

a group a subscriber

22

Page 23: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

can have multiple publishers.

a group

23

Page 24: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Previously

• Motivation for Interest Management

• Aura-based / Cell-based / General IM

• Publish / Subscribe Abstractions

• IP Multicast

24

Page 25: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Cell-based

25

Page 26: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Is rectangle the best shape for a cell?

26

Page 27: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Hexagonal cells approximate a circle better.

27

Page 28: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Require less subscribe/unsubscribe when moving.

28

Page 29: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Assume a player is interested in it’s current cell and surrounding cell.

29

Page 30: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Assume a player is interested in it’s current cell and surrounding cell.

30

Page 31: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

and moves to a neighboring cell with equal probability.

31

Page 32: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

and moves to a neighboring cell with equal probability.

32

Page 33: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Every move requires 3 new subscriptions and 3 un-subscriptions.

unsubscribe

subscribe

33

Page 34: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Moving horizontally/vertically requires 3 new subscription and 3 unsubscriptions.

34

Page 35: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Moving diagonally requires 5 new subscription and 5 unsubscriptions.

35

Page 36: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Hexgonal cells is better1. rounder2. less group join/leave

36

Page 37: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Visibility-Based Interest Management

37

Page 38: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

38

Page 39: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

39

Page 40: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

A player P is interested in (events generated by) an

entity Q if P can see Q, and Q is near P.

40

Page 41: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

41

Page 42: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

need not be binary: can generalize to multi-

level of interest depending on distance

42

Page 43: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Ray Visibility Interest Management

43

Page 44: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Object-to-Object Visibility

1. Expensive2. Frequent re-calculations.

but gives exact visibility.

44

Page 45: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

A player P is interested in (events generated by) an entity Q if P can see Q’s

cell, and Q is near P.

45

Page 46: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Object-to-Cell Visibility

46

Page 47: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Object-to-CellVisibility

1. Less expensive2. Less frequent re-calculations3. Less accurate

47

Page 48: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

When player moves, still need to recompute

visible cells.

48

Page 49: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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.

49

Page 50: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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.

50

Page 51: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Cell-to-Cell Visibility

51

Page 52: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Cell-to-Cell Visibility

1. Much Less expensive2. Calculate once!

but even less accurate.

52

Page 53: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Computing Cell-to-Cell Visibility

53

Page 54: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Check if there exist two points, one in each cell, that can see each other (can draw a line

without passing through occlusion)

54

Page 55: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

55

Page 56: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

56

Page 57: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

path between them, and ...

57

Page 58: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

consider the non-occluded boundaries along path..

58

Page 59: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

59

Page 60: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

60

Page 61: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Linearly Separable Point Sets

no yes

61

Page 62: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

(x1,y1)

(x2,y2)

ax + by - c = 0

62

Page 63: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

ax + by - c = 0ax1 + by1 - c > 0 for all (x1,y1) in Lax2 + by2 - c < 0 for all (x2,y2) in R

(x1,y1)

(x2,y2)

ax + by - c = 0

63

Page 64: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

64

Page 65: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

(Irregular) triangular cells can adapt toany polygonal occlusions.

65

Page 66: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

66

Page 67: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Recap: Shape of cellsVisibility-based IMPre-computing C2C Visibility

67

Page 68: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Generalized Interest Management

68

Page 69: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

69

Page 70: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

70

Page 71: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

71

Page 72: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

A subscription specify a region in the same space.

72

Page 73: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

73

Page 74: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

74

Page 75: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

75

Page 76: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Dimensional Reduction

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

76

Page 77: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

77

Page 78: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

How to test if two intervals overlap?

78

Page 79: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

79

Page 80: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

80

Page 81: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

81

Page 82: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Active Subscriptions: S1

S1

82

Page 83: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Active Subscriptions: S1, S2

S1

S2

83

Page 84: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Active Subscriptions: S1, S2Active Update Regions: U1

S1

S2

U1

84

Page 85: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

We can determine the overlaps when we process the endpoint of a region.

85

Page 86: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Active Subscriptions: S2Active Update Regions: U1

S1 overlaps U1

S1

S2

U1

86

Page 87: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Active Subscriptions: noneActive Update Regions: U1

S2 overlaps U1

S1

S2

U1

87

Page 88: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

88

Page 89: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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.

89

Page 90: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Exercise: trace through the smallexample and convince yourself that it works..

90

Page 91: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

O(n + m) to scan

91

Page 92: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

92

Page 93: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Temporal Coherence

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

93

Page 94: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

Sort-based approach:O(n log n + m log m) to pre-sort the dataO(n + m) for sorting (insertion sort)O(n + m) to scan

94

Page 95: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

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

95

Page 96: Interest Management - comp.nus.edu.sgooiwt/cs4344/4344-lec4-im.pdf · Each cell is a group. A subscriber can subscribe to multiple cells. A group can have multiple publishers. a group

96