1. Switchboard: A matchmaking
System for Multiplayer Mobile
Games
Justin Manweiler – Sharad Agarwal –
Ming Zhang – Romit Roy Choudhury
– Paramvir Bahl
MICROSOFT RESEARCH
DUKE UNIVERSITY
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
1
2. MAIN POINTS
•
•
•
•
•
•
INTRODUCTION
MOTIVATION AND PRIOR WORK
ESTIMATING CELLULAR LATENCY
SWITCHBOARD
IMPLEMENTATION & EVALUATION
CONCLUTIONS
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
2
3. What is matchmaking
Assigning players to games such the game
setting are satisfied as well as the latency
requirements for an enjoyable game.
Solves two problems
1. The service need to know the cellular
network latency between players
2. Quickly group players into viable game
session.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
3
4. Type of games in cell phones
– single player , turn based(card games) , FPS , multiplayer
only over Bluetooth or WIFI.
Problem of multiplayer games is LATENCY
Latency depends
– Network speed of a player in a game.
Solving this problem by effective matchmaking.
– Players must be grouped:
1. Each player’s network performance meets needs of the
game
2. Size of group must be inside the limits of the game
The challenging type of matchmaking is P2P.
The reason is because with servers the cost is big.(so vie
3G we can communicate)
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
4
5. •
•
•
•
This is the first paper to address the
matchmaking problem for multiplayer games
over cellular networks.
We show that it reduces P2P over phone the
latency compared via server.
It is possible to estimate or predict latency
that a phone have.
How if we use the latency estimation we can
reduce the burden for effective matchmaking
Design and implement Switchboard.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
5
6. Latency in multiplayer game
User behavior can change with 50ms-200ms
latency depending the game.
Techniques for hiding latency:
1. Lockstep protocol
2. Dead reckoning
If the typical network latency of one player is high,
then the experience for all players suffers.
1. The game will progress very slow.
2. Will be many consistency correction
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
6
7. 1. Many online games using Matchmaking
( servers ready and goes to server with low
latency)
2. Star-hub topology
(how we can take the host by one be the central
server)
3. Clique
(directly communicate with an other player)
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
7
8. The latency between two phones
By the popularity of P2P online games, we believe that low latency ,
Multiplayer games over cellular data networks are better enabled through P2P
Compare 4 strategies P2P using 1,2 many geographic servers.
Direct is P2P the other is with servers. It is better via direct(P2P)
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
8
9. •
The same mobile networks can experience very
different latencies.
• One of the most important aspects of
matchmaking is knowing the latency each player
will have to each potential peer.
• Once the latencies between players are measured
or predicted the remaining challenge in
matchmaking is to group them into viable game
sessions.
• Creating such groups under latency constraints
while maximizing group sizes is related to the
minimum clique partition problem.
Which is NP-complete.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
9
10. Estimating cellular latency
We use the
FRH : First Responding Hope.
(when a trace rout is
attempted from a phone to
any destination on the
internet, it is the first hop
beyond the phone to
respond with ICMP)
Internet Control Message
Protocol (ICMP)
For to estimate the latency
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
10
11. Predict the future latency of a phone
How 3G latency vary over time?
• For wired connections to
the internet a common
latency is the mean of a
small number of pings.
• The latency a phone
experiences over a short
duration of time.
• 15 second window of
measurements is very
predictive of future
latencies.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
11
12. Predict the future latency of a phone
Over what timescale is 3G
latency predictable?
• We show the mean time
window to window change
in latency to the FRH, which
shows a dip around 15
minutes.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
12
13. Slightly different behavior
Confirms the highest stability 15
minute duration
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
13
14. Predict the future latency of a phone
How many future time windows
is one window predictive of?
• 15 minute time of window is
very predictive .
• How rapidly this predictive
power degrades over
successive 15 m time window
dows.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
14
15. Predict the future latency of a phone
How many measurements are
needed in each time window
60 packets over a course of 15
minutes is a reasonable trade-off
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
15
16. Using the latency of one phone to
predict the future of a different phone
• We have found that a phone needs to measure its
latency about 60 times in a 15 minute window to
predict its latency in future 15 minute window.
We need to determine what parameters of
connectivity that if are the same between two
phones also mean that they are share similar
latency. (different latency in Redmond and
Durham)
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
16
17. Using the latency of one phone to
predict the future of a different phone
Connectivity parameters with little influence
Negative findings before the positive findings:
1. IP address is representative of a phone’s latency
2. Correlation between 3G signal strength and its latency
3. Will driving in the city doing experiments we see little
correlation between speed and latency
4. Latency variation over a human-induced load on the network
5. The results are specific to HSDPA connectivity
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
17
18. Using the latency of one phone to
predict the future of a different phone
Phones under the same cell tower
When a phone is connected to a cellular network certain
parameters of that connectivity are exposed to the mobile
1. CID(Cell tower ID)
2. LAC(Location Area Code)
EXPERIMENT
We placed one phone at a fixed location for long duration of time
and a second phone for 30 minutes each in a variety of
locations.
(Durham , Seattle , Redmond)
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
18
19. The maps of our experiment
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
19
20. Results of Seattle experiment
S-home when both are next to each
other
Latona to the same CT but fare away
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
20
21. Results of Redmond/Durham
Similar latency with the same
CID
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
21
22. PREDICTING THE LATENCY BETWEEN
PHONES
• For P2P multiplayer game we
need to predict the end to end
latency between pairs of
phones.
• The left most line which is the
FRH to FRH latency is fairly
straight in comparison.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
22
23. SWITCHBOARD
• The Goal of a matchmaking service is to
abstract away the problem of assigning players
to game sessions so that each game developer
does not have independently solve this.
• The amount of time that a player spends in the
matchmaking lobby has to be minimal as well
and should not grow significantly as a game
becomes popular and more users participate in
the matchmaking.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
23
24. Architecture of Switchboard
• Two set of components( client – centralized) cloud based
service.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
24
25. SWITCHBOARD
Lobby browser
Provide ample flexibility in specifying requirements while
remaining intuitive.
Three types of constraints:
1. A simple requirement for the maximum of players sharing
the same game session
2. A simple restriction on the distribution of end to end latency
between any pair of players
3. Segregating players into different matchmaking lobbies
based in the type of game they want to play.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
25
26. SWITCHBOARD
Latency estimator
• Grouping agent
It will request latency distributions only between those clients
that have the same lobby hash.
The database keeps a sliding window of measurements from the
past 15 minutes.
Measurement controller divides the global set of clients into 3
queues
1. Free pool
2. Active pool
3. Cool off pool
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
26
27. SWITCHBOARD
Latency estimator
Performance measurement
1. The measurement duration
2. The measurement rate
3. A list of unique FRHs
The latency Estimator computes this as the sum of 3 components
1. Latency of the first client to its FRH
2. Latency of the second client to its FRH
3. FRH to FRH latency
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
27
28. SWITCHBOARD
Grouping Agent
For each unique lobby hash the Lobby Service hands over to the
Grouping Agent
the list of clients the maximum number of players and the
latency test parameters.
Obtains the latency distribution between each pair of clients in
this lobby from the Latency Estimator.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
28
29. SWITCHBOARD
Grouping algorithm
The goal of the algorithm is to assign players to different groups
1. Maximizes the number of player to each group.
2. Satisfies the latency and group size constraints.
While there exist many clustering methods ( to solve grouping
problem) we pick hierarchical and quality threshold clustering
because they have low computational complexity and can
easily accommodate different group topologies.
The clustering methods can work with any topology.
The grouping algorithm is polynomial
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
29
30. IMPLEMENTATION & EVALUATION
IMPLEMENTATION
Matchmaking itself is not very sensitive to small
latencies because it is only sets up the game
session and is not used during game play
itself. Hence we have deployed only a
centralized instance of the service.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
30
31. IMPLEMENTATION & EVALUATION
EVALUATION OF GROUPING
We now evaluate the importance of pair wise latency estimation
for effective grouping and the impact of bucket size on
grouping time and group sizes.
Franction of total population
FracPop(T)=
Pop(C) and ntower(C) : population number
TotalPop = total population
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
31
32. IMPLEMENTATION & EVALUATION
EVALUATION OF GROUPING
We now evaluate the importance of pair wise latency estimation
for effective grouping and the impact of bucket size on
grouping time and group sizes.
Franction of total population
FracPop(T)=
Pop(C) and ntower(C) : population number
TotalPop = total population
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
32
33. IMPLEMENTATION & EVALUATION
EVALUATION OF GROUPING
We generate a set of n players using this model. For each tower T
we generate n x FracPop(T) players.
We can compute the latency between any pair of players (p1,p2)
rttFRH(p1)+ rttFRH(p2) + rtt(FRH(p1),FRH(p2))
rtt(FRH(p1),FRH(p2)) between FRH(p1) and FRH(p2)
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
33
34. IMPLEMENTATION & EVALUATION
LATENCY VS GEOGRAPHY-BASED GROUPING
• We try another one algorithm
which groups players by their
geographic proximity.
• Note each GeoGroup produced
by the geography-based
grouping
• Geography-based grouping
produces larger viable groups
when the distance constraint
increases.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
34
35. IMPLEMENTATION & EVALUATION
LATENCY VS GEOGRAPHY-BASED GROUPING
• This effect diminishes as the
constraint increases.
• This effect diminishes as the
constraint surpasses 400 miles.
• Larger distance constraint
produces bigger GeoGroup.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
35
36. IMPLEMENTATION & EVALUATION
EFFECT OF BUCKET SIZE
Impact of group size. Bigger size
improves ratio.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
36
37. IMPLEMENTATION & EVALUATION
END TO END EVALUATION
We evaluate the performance of the complete end to
end Switchboard as a whole including measurement
and grouping.
Each client waits for placement in a matchmaking group
until:
1. Such a group is formed
2. Switchboard determines that the client’s first-hop
latency is too high, and thus group placement is
impossible.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
37
38. IMPLEMENTATION & EVALUATION
END TO END EVALUATION
As the number of clients using Switchboard increases:
1. Server bandwidth requirements scale sub-linearly
2. Per-client probing overheads decrease
3. Larger group can be formed
4. Client delays for measurement and grouping decrease
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
38
39. IMPLEMENTATION & EVALUATION
BANDWIDTH AND PROBING REQUIREMENTS
Client to server bandwidth over
time aggregated across all
clients connected to
Switchboard
60 measurements in 15 minutes
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
39
40. IMPLEMENTATION & EVALUATION
BANDWIDTH AND PROBING REQUIREMENTS
Distribution of ICMP
measurements performed
my each client.
Greater load of Switchboard
overhead for each client
becomes lower and more
predictable.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
40
41. IMPLEMENTATION & EVALUATION
Client Matchmaking Experience
We evaluate the size of viable
groups that Switchboard
creates how long clients wait
for those results.
higher client arrival rates ,it is
possible to form larger
matchmaking groups.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
41
42. IMPLEMENTATION & EVALUATION
Client Matchmaking Experience
This is expected, since at higher arrival rates, the steady-state
number of waiting clients is also higher-providing a larger pool
of clients on which to cluster.
The bucket size here reflects the maximum number of clients that
can be simultaneously clustered.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
42
43. IMPLEMENTATION & EVALUATION
Client Matchmaking Experience
• The total amount of time a
client spends in
matchmaking, broken down
by the measurement delay
and the grouping delay
• A peer will wait till it
grouped.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
43
44. Conclusion
• We demonstrate that P2P in 3G is a viable way to both reduce
the latency of such games and the cost to the developer to
maintain game servers.
• Depending the number and the location of servers P2P can
reduce the latency as much as 148ms.
• We show that a small number of measurements in a 15
minute window sufficiently characterizes not only the latency
of that phone but also of the others to the same Cell Tower.
CHRIS BOURSINOS/AUEB 2011/ DISTRIBUTED SYSTEMS - V. KALOGERAKH/FALL 2011
44