9 Compensating Resource Limitations 9 Compensating Resource - - PDF document

9 compensating resource limitations 9 compensating
SMART_READER_LITE
LIVE PREVIEW

9 Compensating Resource Limitations 9 Compensating Resource - - PDF document

9 Compensating Resource Limitations 9 Compensating Resource Limitations Information Information- -Centric Centric View of Resources View of Resources aspects of compensation aspects of compensation information principle


slide-1
SLIDE 1

1

§9 Compensating Resource Limitations §9 Compensating Resource Limitations

  • aspects of compensation

aspects of compensation

  • information principle equation

information principle equation

  • consistency and responsiveness

consistency and responsiveness

  • scalability

scalability

  • protocol optimization

protocol optimization

  • dead reckoning

dead reckoning

  • local perception filters

local perception filters

  • synchronized simulation

synchronized simulation

  • area

area-

  • of
  • f-
  • interest filtering

interest filtering

Information Information-

  • Centric

Centric View of Resources View of Resources

  • Bandwidth requirements increase

Bandwidth requirements increase with the number of with the number of players players

  • Each additional

Each additional player player

  • must receive the initial

must receive the initial game game state and the updates that other state and the updates that other users are already receiving users are already receiving

  • introduces new updates to the

introduces new updates to the existing existing shared state shared state and new and new interactions interactions with the with the existing existing players players

  • introduces new shared

introduces new shared state state

  • Additional

Additional players players require require additional processor cycles at additional processor cycles at the existing the existing player’s player’s host host

  • Each additional

Each additional player player

  • introduces new elements to

introduces new elements to render render

  • increases the amount of

increases the amount of caching (new shared state ) caching (new shared state )

  • increases the number of

increases the number of updates to receive and handle updates to receive and handle

Information Information Principle Principle

  • The most scalable

The most scalable networked application networked application is the one that does is the one that does not require not require networking networking

  • To

To achieve scalability and performance, achieve scalability and performance, the the overall resource

  • verall resource

penalty incurred within penalty incurred within a networked application must be a networked application must be reduced reduced The resource utilization is directly related to the amount of information that must be sent and received by each host and how quickly that information must be delivered by the network. The resource utilization The resource utilization is is directly related to the amount of directly related to the amount of information that must be sent and received by each host and information that must be sent and received by each host and how quickly that information must be delivered by the how quickly that information must be delivered by the network. network.

Information Principle Equation Information Principle Equation

Resources = Resources = M M × × H H × × B B × × T T × × P P M M = = number of number of m messages transmitted essages transmitted H H = = average number of destination average number of destination h hosts for each message

  • sts for each message

B B = = average amount of network average amount of network b bandwidth required for a andwidth required for a message to each destination message to each destination T T = = t timeliness in which the network must deliver packets to each imeliness in which the network must deliver packets to each destination destination P P = = number of number of p processor cycles required to receive and process rocessor cycles required to receive and process each message each message

Information Principle Equation as a Tool Information Principle Equation as a Tool

  • Each reduction

Each reduction ⇒ ⇒ a compensating increase or a compensating a compensating increase or a compensating degradation in the quality degradation in the quality

  • How to modify depends on the application

How to modify depends on the application

M M H H B B T T P P Dead Reckoning Dead Reckoning

Information Principle Information Principle Equation: Examples Equation: Examples

M M H H B B T T P P M M H H B B T T P P Server Server-

  • network

network

p1,1 p1,2 p1,n p2,1 p2,2 p2,n p3,1 p3,2 p3,n Server 2 Server 3 Server 1

Message Message compression compression

36 bytes 36 bytes 24 bytes 24 bytes

slide-2
SLIDE 2

2

Consistency and Responsiveness Consistency and Responsiveness

  • consistency

consistency

  • similarity of the view to the data in the nodes belonging to a n

similarity of the view to the data in the nodes belonging to a network etwork

  • responsiveness

responsiveness

  • delay that it takes for an update event to be registered by the

delay that it takes for an update event to be registered by the nodes nodes

  • traditionally, consistency is important

traditionally, consistency is important

  • distributed databases

distributed databases

  • real

real-

  • time interaction

time interaction ⇒ ⇒ responsiveness is important and consistency can be responsiveness is important and consistency can be compromised compromised

⇒ ⇒ the game world can either be

the game world can either be

  • a

a dynamic world dynamic world in which information changes frequently or in which information changes frequently or

  • a

a consistent world consistent world in which all nodes maintain identical information in which all nodes maintain identical information

but it cannot be both but it cannot be both

Absolute Consistency Absolute Consistency

  • To guarantee

To guarantee absolute consistency absolute consistency among the among the nodes, nodes, the data source must wait until the data source must wait until everybody has received the information before it everybody has received the information before it can can proceed proceed

  • delay from original

delay from original message transmission, message transmission, acknowledgements, acknowledgements, possible retransmissions possible retransmissions

  • The source can generate updates only at a limited rate

The source can generate updates only at a limited rate

  • Time

Time for the communication protocol to reliably disseminate the stat for the communication protocol to reliably disseminate the state updates to the e updates to the remote remote nodes nodes

A A B B

Time Time Currently Currently

I’m at ( I’m at (10, 20 10, 20) ) I’m at ( I’m at (15, 25 15, 25) )

After 100 ms After 100 ms

A is at ( A is at (10, 20 10, 20) )

A A B B

T r a n s m i t T r a n s m i t

After 200 ms After 200 ms

A A B B

Acknowledge Acknowledge

High Update Rate High Update Rate

  • There is a delay before the state change is received by other

There is a delay before the state change is received by other nodes nodes

  • If the

If the state information state information is updated often, it might be updated while is updated often, it might be updated while the previous the previous update update messages are still on the way messages are still on the way

  • Whilst some

Whilst some nodes nodes see new see new values, values, others may still see older

  • thers may still see older ones
  • nes
  • Because of the inherent transmission delay,

Because of the inherent transmission delay, one

  • ne cannot update the shared state frequently and

cannot update the shared state frequently and still ensure that all remote hosts have already received all pre still ensure that all remote hosts have already received all previous state updates vious state updates

S S

Trade Trade-

  • off Spectrum
  • ff Spectrum
  • Available network bandwidth must be allocated between

Available network bandwidth must be allocated between

  • messages for updating the

messages for updating the state information and state information and

  • messages for maintaining a consistent view of

messages for maintaining a consistent view of the the state information state information

among among participants. participants.

Absolute Absolute consistency consistency High High update rate update rate The The trade trade-

  • off
  • ff spectrum

spectrum

Relay Model Relay Model

node node local local network network global global relay relay

Two Two-

  • Way Relay

Way Relay

f f g g i ilocal

local

  • local

local

i iglobal

global

  • global

global

slide-3
SLIDE 3

3

Short Short-

  • Circuit Relay

Circuit Relay

f f g g i ilocal

local

  • local

local

i iglobal

global

  • global

global

h h

Scalability Scalability

  • ability to adapt resource changes

ability to adapt resource changes

  • supporting a varying amount of human players

supporting a varying amount of human players

  • allocating synthetic players

allocating synthetic players

Amdahl’s Law Amdahl’s Law

  • time required by serially executed parts cannot be reduced by

time required by serially executed parts cannot be reduced by parallel computation parallel computation

  • theoretical speedup:

theoretical speedup: S S( (n n) = ) = T T(1) / (1) / T T( (n n) ≤ ) ≤ T T(1) / ( (1) / (T T(1) / (1) / n n) = ) = n n

  • execution time has a serial part

execution time has a serial part T Ts

s and parallel part

and parallel part T Tp

p

  • T

Ts

s +

+ T Tp

p = 1

= 1

  • α

α = = T Ts

s / (

/ (T Ts

s +

+ T Tp

p)

)

  • speedup with optimal serialization:

speedup with optimal serialization: S S( (n n) = ( ) = (T Ts

s +

+ T Tp

p) / (

) / (T Ts

s +

+ T Tp

p/

/n n) ) ≤ ≤ 1/ 1/α α

  • example:

example: α α = 0.05 = 0.05 ⇒ ⇒ S S( (n n) ) ≤ ≤ 20 20

Serial and Parallel Execution Serial and Parallel Execution

  • ideally everything should be calculated in parallel

ideally everything should be calculated in parallel

  • everybody plays their game regardless of others

everybody plays their game regardless of others

  • if there is communication, there are serially executed parts

if there is communication, there are serially executed parts

  • the players must agree on the sequence of events

the players must agree on the sequence of events

Interaction in a Multiplayer Game Interaction in a Multiplayer Game

player 1 player 2 player 3 time

Turn Turn-

  • based game

based game Real Real-

  • time game

time game

player 1 player 2 player 3 time

Communication Capacity: Example Communication Capacity: Example

  • client

client-

  • server using unicasting in a 10 Mbps Ethernet using

server using unicasting in a 10 Mbps Ethernet using IPv6 IPv6

  • each client sends 5 packets/s containing a 32

each client sends 5 packets/s containing a 32-

  • bit integer value

bit integer value

  • bits in the message:

bits in the message: d d = 752 + 32 = 752 + 32

  • update frequency:

update frequency: f f = 5 = 5

  • capacity of the communication channel:

capacity of the communication channel: C C = 10 = 107

7

  • number of unicast connections:

number of unicast connections: n n = ? = ?

  • d

d · · f f · · n n ≤ ≤ C C ⇒ ⇒ n n ≤ 2551 ≤ 2551

slide-4
SLIDE 4

4

Communication Capacity Communication Capacity

O O( (n n) ) Hierarchical server Hierarchical server-

  • network

network O O( (n n/ /m m + + m m)… )…O O( (n n/ /m m + + m m2

2)

) Peer Peer-

  • to

to-

  • peer server

peer server-

  • network

network O O( (n n) ) Client Client-

  • server

server O O( (n n)… )…O O( (n n2

2)

) Peer Peer-

  • to

to-

  • peer

peer Single node Single node

Capacity requirement Capacity requirement Architecture Architecture