§8.2 Logical Platform §8.2 Logical Platform Communication Architecture Communication Architecture � communication architecture communication architecture � � peer peer- -to to- -peer peer � � client client- -server server � � server server- -network network � Single node Single node � data and control architecture data and control architecture � � centralized centralized � Peer- Peer -to to- -peer peer � replicated replicated � � distributed distributed � Server- -network network Server Client- Client -server server Example: How Many Players Can We Example: How Many Players Can We Communication Architecture (cont’d) Architecture (cont’d) Communication Put into a Two- Put into a Two -Player LAN? Player LAN? � Logical connections Logical connections � Distributed Interactive Simulation Distributed Interactive Simulation � Assumptions: Assumptions: � � � (DIS) protocol data unit (PDU): (DIS) protocol data unit (PDU): � sufficient processor power sufficient processor power � how the messages flow how the messages flow � � LAN 144 bytes (1,152 bits) 144 bytes (1,152 bits) � no other network usage no other network usage � � Graphics: 30 frames/second Graphics: 30 frames/second � � a mix of player types a mix of player types � � Physical connections Physical connections � � PDU rates PDU rates � � the wires the wires between the between the � ⇒ LAN: 8,680 packets/second ⇒ � aircraft 12 PDU/second aircraft 12 PDU/second LAN: 8,680 packets/second � computers computers fully articulated humans + firing = fully articulated humans + firing = � ground vehicle 5 PDU/second ground vehicle 5 PDU/second � � the limiting factor in the limiting factor in 263 humans 263 humans � � weapon firing 3 PDU/second weapon firing 3 PDU/second � aircrafts + firing = 578 aircrafts aircrafts + firing = 578 aircrafts communication architecture communication architecture p 2 � fully articulated human 30 fully articulated human 30 p 1 � ground vehicles + firing = 1,085 ground vehicles + firing = 1,085 design design PDU/second PDU/second vehicles vehicles Two players on a LAN � Bandwidth Bandwidth � � Typical NPSNET Typical NPSNET- -IV DIS battle IV DIS battle � � Ethernet LAN 10 Mbps Ethernet LAN 10 Mbps � � limits to 300 players on a LAN limits to 300 players on a LAN � � modems 56 Kbps modems 56 Kbps � � processor and network processor and network � limitations limitations Multiplayer Client- Multiplayer Client -Server Server Systems: Systems: Example (cont’d) Example (cont’d) Logical Architecture Architecture Logical ⇒ ⇒ Modem: 48 packets/second Modem: 48 packets/second � Client Client- -server system server system � In a two In a two- -player game on a LAN, player game on a LAN, � � fully articulated humans + firing = 1 fully articulated humans + firing = 1 � each player sends packets to each player sends packets to the protocol selection (TCP, UDP, the protocol selection (TCP, UDP, � human human other players via a server players via a server other broadcast,...) hardly matters broadcast,...) hardly matters aircrafts + firing = 3 aircrafts aircrafts + firing = 3 aircrafts � Server slows down the message Server slows down the message � ground vehicles + firing = 6 vehicles ground vehicles + firing = 6 vehicles � As the number of live or As the number of live or � delivery delivery Communication paths autonomous players increase an autonomous players increase an � Benefits of Benefits of having a having a server server � � Redesign packets Redesign packets � efficient architecture becomes efficient architecture becomes � no need to no need to send all packets to all send all packets to all � � � size 22%, 32 bytes size 22%, 32 bytes players players more important more important ⇒ Modem: 218 packets/second ⇒ Modem: 218 packets/second � compress multiple packets to a compress multiple packets to a � fully articulated humans + firing = 7 fully articulated humans + firing = 7 single packet single packet human human � smooth out smooth out the packet flow the packet flow � aircrafts + firing = 14 aircrafts aircrafts + firing = 14 aircrafts p 1 p 2 p n � reliable communication without reliable communication without � ground vehicles + firing = 27 vehicles ground vehicles + firing = 27 vehicles the overhead of a fully connected the overhead of a fully connected Multiplayer client-server - logical architecture game game � administration administration � 1
Multiplayer Client Multiplayer Client- -Server Systems: Server Systems: Physical Physical Architecture Can Architecture Can Match Match Physical Architecture (on a LAN) the Logical Logical Architecture Architecture Physical Architecture (on a LAN) the � All messages in the same wire All messages in the same wire Server � � Server has to provide some added Server has to provide some added- -value function value function � � collecting data collecting data � Phone lines � compressing and redistributing information compressing and redistributing information � � additional computation additional computation � LAN p 1 p 2 p n Server p 1 p 2 p n Multiplayer client-server - physical architecture with phone lines Multiplayer client-server - physical architecture on a LAN Traditional Client- -Server Server Traditional Client Multiplayer Multiplayer Server Server- -Network Architecture Network Architecture � Server may act as Server may act as � Players Players can locate in the same can locate in the same � � � broadcast reflector broadcast reflector place in the place in the game world, game world, but but � C C C C C C C C C reside on different different servers servers C � filtering reflector filtering reflector reside on � p 1,1 p 1,2 p 1,n � packet aggregation server packet aggregation server � � real world ≠ game world real world ≠ game world � C C C C � Server Server- -to to- -server connections server connections � Server 1 transmit the world the world state state � Scalability problems Scalability problems transmit � S S C C information information � all traffic all traffic goes through goes through the the � server server � WAN, LAN WAN, LAN Server 2 Server 3 C C � C C � Each server serves a number of Each server serves a number of � ⇒ Server ⇒ Server- -network architecture network architecture client players client players C C C C C C C C � LAN, modem, cable modem LAN, modem, cable modem � p 2,1 p 2,2 p 2,n p 3,1 p 3,2 p 3,n � Scalability Scalability � Partitioning the Game World Partitioning the Game World across across Multiple Multiple Partitioning Clients across across Multiple Servers Multiple Servers Partitioning Clients Servers Servers � The servers exchange control The servers exchange control � Each server manages clients Each server manages clients � � messages among themselves messages among themselves located within a certain region located within a certain region C C C C C C C C � Client communicates with Client communicates with � inform the interests inform the interests of their of their � � C C clients clients different serves as it different serves as it moves moves S S S S � Reduces the workload on each Reduces the workload on each � Possibility to aggregate messages Possibility to aggregate messages � � S S S S C C C C server server � Eliminates a lot of network traffic Eliminates a lot of network traffic � � Incurs a greater Incurs a greater latency latency � Requires Requires advanced advanced configuration configuration � S S S S � C C � Is Is a region a region visible from another visible from another � The total The total processing and processing and � � C S C region? region? C S bandwidth requirements are bandwidth requirements are C C C S S C C greater greater C C C C C C C C C C C C C C C C C C 2
Recommend
More recommend