CS4344 Lecture 8: Hybrid Architecture

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    CS4344 Lecture 8: Hybrid Architecture - Presentation Transcript

    1. Hybrid Architecture for Networked Games 1
    2. single completely centralized decentralized server 2
    3. P2P with Central Arbiter 3
    4. A trusted central arbiter receives all game traffic and resolve conflicts if necessary. 4
    5. Benefits of P2P + Arbiter 5
    6. low latency among players 6
    7. have trusted authority now 7
    8. Drawbacks of P2P + Arbiter 8
    9. limited scalability arbiter becomes bottleneck 9
    10. Mirrored Servers Architecture 10
    11. Multiple servers, each replicating the complete game states, serve clients from different geographical regions. Each client connects to one server. 11
    12. Servers may be connected with high speed, provisioned networked, reducing synchronization latency among the servers. 12
    13. Updates from a client are sent to its server, which then forwards it to other servers. The servers then forward the updates to all relevant clients. 13
    14. P2P-style state synchronization among servers is easier, since 1. servers can be trusted 2. clocks can be synchronized 3. IP multicast may be used 4. higher availability 5. shorter delay 14
    15. Benefits of Mirrored Servers 15
    16. no single point of failures A client can use another replicated server if their nearest server fails. 16
    17. increase total network capacity good if networking bandwidth is the bottleneck 17
    18. lower latency between client and server 18
    19. Drawbacks of Mirrored Servers 19
    20. latency between players increases due to additional forwarding 20
    21. cannot scale to large world each server still keeps the complete states 21
    22. how to assign players to servers? 22
    23. Assigning players to closest servers may lead to overloaded servers. 23
    24. Assigning players to remote servers may increase end-to-end latency. 24
    25. But we only care about latency between players that are relevant to each other. 25
    26. An Open Problem 26
    27. let AOI(p) be the set of players relevant to p S(p) be the server of player p d(i,j) be the delay between i and j P(s) be the set of players assigned to server s 27
    28. let L(p) be the average latency experience by p, considering only relevant players 28
    29. want to find S() such that maximum L(p) is minimized over all p subjected to maximum P(s) is constrained for all s 29
    30. Zoned Servers Architecture 30
    31. Divide the game world into independent regions. One server is in-charged of one region. 31
    32. A client connects to the server serving its current region, and is handed-off to another server when it moves to another region. 32
    33. Servers seldom communicate with each other. 33
    34. Updates from a client are sent to its server, which then forwards it to all relevant clients in the same region. 34
    35. 35
    36. Advantages of Zoned Servers 36
    37. Can scale to large world Just add more servers 37
    38. Drawbacks of Zoned Servers 38
    39. Single point of failures (But can deploy mirrors for each region) 39
    40. Constrained Game Designs 40
    41. Supporting Seamless Game Worlds 41
    42. Divide the game world into regions. One server is in-charged of one region. 42
    43. Player may move around the world seamlessly 43
    44. A client may see events and objects from neighboring regions. 44
    45. Events occurring in one region may affect objects in another region. 45
    46. Advantage: Partitioning is transparent to the players. No artificial constraints in game design. 46
    47. Advantage: We can now resize the regions to load-balance among the servers, improving server utilization. 47
    48. A client connects to the server serving its current region, and is handed-off to another server when it moves to another region. 48
    49. Server communicates with each other to transfer states, update states etc. 49
    50. Updates from a client are sent to its server, which then forwards it to all relevant clients in the same region or neighboring regions. 50
    51. or 51
    52. A client connects to the servers serving its current region and regions it subscribes to. Updates from neighboring server are sent directly. 52
    53. Q: How to partition the game world? 53
    54. Ideally: each server should handle the same number of players 54
    55. Ideally: minimize communications between servers 55
    56. Ideally: minimize the number of hand offs 56
    57. Idea: divide the game world into small cells and assign group of cells to servers. 57
    58. 58
    59. I will simplify the representation to a grid of cells with number indicating the number of players (or load incurred on server) in this cell. 2 0 3 3 1 4 1 1 0 59
    60. Centralized approach to partitioning 60
    61. Balanced Deployment Algorithm by Bart De Vleeschauwer et al 61
    62. Idea: sort the cells and assign them one-by-one, highest load first, to the servers to minimize the maximum server load 62
    63. Suppose we have only two servers (blue and red). 2 0 3 3 1 4 1 1 0 63
    64. Blue’s load = 4 Red’s load = 0 2 0 3 3 1 4 1 1 0 64
    65. Blue’s load = 4 Red’s load = 3 2 0 3 3 1 4 1 1 0 65
    66. Blue’s load = 4 Red’s load = 6 2 0 3 3 1 4 1 1 0 66
    67. Blue’s load = 6 Red’s load = 6 2 0 3 3 1 4 1 1 0 67
    68. Blue’s load = 8 Red’s load = 7 2 0 3 3 1 4 1 1 0 68
    69. Problem: neighboring cells are not adjacent. There are 8 “borders” in this solution. Communication overhead is not considered. 2 0 3 3 1 4 1 1 0 69
    70. Let’s define a cost function for assigning a cell c to a server S: cost(c,S) = computation load increase in S + communication load increase in S 70
    71. For simplicity, CPU load = players, newtork load = borders 71
    72. Clustered Deployment Algorithm by Bart De Vleeschauwer et al 72
    73. Start with each cell as one cluster 73
    74. Repeatedly merge two adjacent clusters with least overhead until number of clusters equals to number of servers. 74
    75. 2 0 3 3 1 4 1 1 0 75
    76. Least cost = 1 + 3 = 4 2 0 3 3 1 4 1 1 0 76
    77. Least cost = 2 + 3 = 5 2 0 3 3 1 4 1 1 0 77
    78. Least cost = 1 + 5 = 6 2 0 3 3 1 4 1 1 0 78
    79. Least cost = 3 + 5 = 8 2 0 3 3 1 4 1 1 0 79
    80. 2 0 3 3 1 4 1 1 0 80
    81. Just a heuristic the optimization problem is NP-complete 81
    82. Last few steps involve heavily loaded cells and can create uneven deployment. 82
    83. We can tweak this heuristic in many ways to improve it, but it’s still a heuristic. 83
    84. Simulated Annealing by Bart De Vleeschauwer et al 84
    85. A general method for finding good solution in an optimization problem (meta-heuristic) 85
    86. At every step, move towards a nearby, better configuration probabilistically (allowing a move towards worse solution, prevent stuck at local minimum) 86
    87. cost config 87
    88. Start with a solution from a heuristic. 88
    89. Move to a nearby config: swap cells with an adjacent server, or move cell from one server to another 89
    90. Is it a better solution? If so, keep it as current solution with some probability. 90
    91. 2 0 3 3 1 4 1 1 0 91
    92. Experimental results show that Simulated Annealing works best among the methods. 92
    93. Disadvantages of centralized approach 93
    94. Expensive to compute a good solution 94
    95. How frequent should the world be repartitioned? 95
    96. Localized World Partitioning 96
    97. Idea: Only repartition locally if a server is overloaded. Look for a lightly loaded server to shed some load to. 97
    98. overload safe light 98
    99. Overloaded server sheds load until it’s load is below a safe level. The new load of a previously lightly loaded should remain below safe level. overload safe light 99
    100. l+o-s<s l < 2s - o 100
    101. Who to shed to? 101
    102. Minimize overhead: try to shed to as few neighboring server as possible 102
    103. Migrate cells to neighboring servers that are not overloaded 103
    104. Overload = 10, Safe = 7, Light = 4 0 1 1 2 0 3 1 1 4 5 3 0 104
    105. Green server is overloaded. Shed some load to neighbors. 0 1 1 2 0 3 1 1 4 5 3 0 105
    106. If still not enough, look at the list of lightly loaded servers maintained. Pick the least load and shed to it. 106
    107. Green server is still overloaded. Neighbor (purple) server has hit the safe threshold. 0 1 1 2 0 3 1 1 4 5 3 0 107
    108. Shed load to remote server. But this could lead to high communication cost. 0 1 1 2 0 3 1 1 4 5 3 0 108
    109. When communication overhead is too high, isolated cells can be migrated to a nearby server, “merging” with neighboring regions to form contiguous regions, as long as the load remains below the safe threshold. 0 1 1 2 0 3 1 1 0 1 3 0 109
    110. Another Open Problem 110
    111. No consideration on hand offs 111
    112. Idea: If traffic is high between point A and point B, then A and B should be managed by the same server. 112
    113. 3 2 2 1 1 0 1 2 4 2 0 2 1 1 2 2 4 113
    114. Minimizing hand-off means finding minimum cuts. 3 2 2 1 1 0 1 2 4 2 0 2 1 1 2 2 4 114
    115. Minimizing hand-off means finding minimum cuts. 3 2 2 1 2 4 2 2 1 2 2 4 115
    116. Minimizing hand-off means finding minimum cuts. 3 2 2 1 2 4 2 2 2 4 116
    117. Question: how to combine the three objectives: 1. limiting number of players 2. reduce communication cost 3. reduce number of hand offs 117

    + weitsangweitsang, 2 years ago

    custom

    396 views, 0 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 396
      • 396 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 5
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories