In the previous article of this series, we looked at several architecture designs for supporting global gaming servers, as well as evaluated the strengths and weaknesses of each design. In this article, we will look at specific examples of applying these designs to solve common issues in the gaming industry.
When designing a global rankings service, you must consider demand, analysis, data structure, rank data persistence, rank server SPOF issues, and other issues. A ranking service architecture is shown in the following figure:
This architecture uses Redis to implement data at regular intervals. The game server reports rank data to the rank server. Clients pull rank data from the game server and the game server pulls rank data from the rank server.
All the game servers use GMT Jan 1, 1970 00:00:00 offset (generally an absolute value of 1 for the second count) to express the in-game time. This time is synced to game clients, who use the time zone set on the cell phone to compute the game time to be displayed in the client. The specifications are shown in the figure below.
Why is the game time synchronization necessary?
Solution 1: Use a Cache for Instant Data Writeback
In this method, data is stored centrally and the local caches instantly write data back to the database. The specific architecture is shown in the following figure.
Currently, there are two main scenarios that involve data synchronization:
Scenario 1 Players log on in their local regions (explanation marked in red text in the previous figure).
Scenario 2 Players log on across regions.
Solution 2: Real-time Regional Database Synchronization
The various regional databases are synchronized in real time. You can accomplish this using Message Service or Alibaba Cloud DTS. Each of the regional databases store data for all players.
The players can play the game from different regions, their data need not be migrated. All regions support local data reading and writing.
The asynchronous data synchronization can produce data inconsistencies. If the player uses a VPN to access the game, a transient VPN disconnection can cause the player to log on again in another region. If data synchronization messages are lost or delayed, the data read when a player logs in again may not be up to date.
The various regions contain all player data, so real-time synchronization may put a high level of pressure on the database. Real-time synchronization between regional databases demands a great deal of cross-region leased line bandwidth.
Solution 3: Cross-Region Data Update
When a player logs on from a different region, the player's local server must remotely read combat data. The combat results call an API to trigger a data update on the local server.
Solution 4: Remote Data Migration
When a player logs on from a different region, the player data is remotely migrated from the player's previous server. Each time a player logs on, the system must check if data migration is required.
Game localization is an important factor for consideration of games seeking to enter overseas markets. Games, either being released overseas or looking to expand to new regions must be attentive to localization work. The general approach is to build a standard client installation package, which contains several basic material packages, art material packages for different languages, and some program materials. This allows the game to be dynamically rendered based on the phone's language version.
There are three common installation strategies:
Case Study 1: Game A
Game A is a global server card game. Currently, the game server is deployed in the Alibaba Cloud US West 1 region. The gameplay is not very sensitive to network latency and a latency below 300ms does not affect the gaming experience. Therefore, the customer did not plan for any network access optimization or distributed deployment, adopting the fully-centralized deployment architecture.
Case Study 2: Game B
Game B is a global real-time multiplayer war game. The game adopted the global server game reference architecture with centralized deployment and network optimization.
The game's access layer, business logic layer, and data layer services are all deployed in the Alibaba Cloud US West 1 region. Chinese players use Alibaba Cloud public network BGP to access Express Connect and connect to the VPC for the US West 1 region. Global Acceleration is deployed in China North 2 and set as the access layer's public network portal, with intelligent DNS used for traffic scheduling. This layout improves the game access speed for players on the Chinese mainland.
By describing business needs, technical difficulties, cloud products, player acceleration methods, reference architectures, and typical designs, this article aims to provide complete solutions to more customers who want to develop global server games.
Alibaba Cloud already offers the following technical solutions to address a series of technical difficulties (such as time synchronization, localization, and latency) faced by global server games:
In future, Alibaba Cloud plans to perfect and provide general solutions and solutions for different global server game architectures:
In a nutshell, Alibaba Cloud's global data centers and Express Connect form a global network that assists the global deployment of games.
Alibaba Clouder - March 3, 2021
Iain Ferguson - December 22, 2021
Alibaba Clouder - March 15, 2019
Your Friend in a need - July 15, 2021
Alibaba Cloud MaxCompute - March 25, 2021
JJ Lim - December 6, 2021
An online computing service that offers elastic and secure virtual cloud servers to cater all your cloud hosting needs.Learn More
An on-demand database hosting service for MySQL, SQL Server and PostgreSQL with automated monitoring, backup and disaster recovery capabilitiesLearn More
A scalable and high-performance content delivery service for accelerated distribution of content to users across the globeLearn More
More Posts by Alibaba Clouder