Push Messaging Architecture for Online Game Reliability
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Traditional polling systems for online game messaging are unreliable, leading to delayed or missed notifications due to the lack of direct connections with servers.
Innovation Solution
Implementing a push messaging architecture with periodic polling and direct server connections, utilizing a Zoom server with persistent connections to clients, where messages are stored in memcache and processed through a message queue to ensure timely and reliable message delivery.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If polling servers for messages is used, then message notification is implemented, but message delivery reliability deteriorates and delays occur
Solution Approach 1:
Instead of the client polling the server for messages (traditional approach), the server pushes messages to the client through a persistent connection. This inversion of the communication initiative fundamentally resolves the reliability and timing issues by eliminating the polling mechanism entirely.
Solution Approach 2:
A persistent connection is maintained between the client and server, allowing continuous message delivery without interruption. This continuous connection ensures that messages are delivered immediately when available, eliminating the gaps and delays inherent in periodic polling cycles.
2Reliability
If polling servers for messages is used, then message notification is implemented, but message processing timeliness deteriorates
Solution Approach 1:
The server takes the initiative to push messages to clients through persistent connections, reversing the traditional polling model. This enables immediate message processing as soon as it arrives at the server, eliminating the waiting time inherent in polling cycles.
Solution Approach 2:
Persistent connections are established in advance before messages need to be delivered. This preliminary setup ensures that the communication channel is already open and ready, allowing messages to be pushed and processed immediately without the overhead of establishing new connections or waiting for polling intervals.
3Reliability
If direct server connections are maintained, then message delivery reliability is improved, but system complexity increases
Solution Approach 1:
A connection management intermediary layer is introduced to handle the complexity of maintaining persistent connections. This intermediary abstracts the connection management details from both clients and servers, providing a standardized interface for message pushing while managing the underlying connection complexity centrally.
Data Source
AI summary
A system has a first web node, a first server node, a second server node, a push messaging server, and a second web node. The first web node receives a message from a first player at a first client node for a second player at a second client node within an online game. The first server node maintains a first persistent connection with the first client node. The second server node maintains a second persistent connection with the second client node. The push messaging server stores a game state of the first and second players of the online game, updates the game state based on the message, and notifies the first and second server node. The second web node receives the message from the push messaging server and forwards the message to the second client node via the second persistent connection.


