Android Push Push message arrives success rate optimization
Issue: Server sends a message to the client. This message arrival rate is very low, regardless of whether the client is online or not.
First optimization: Using server to cache data offline, inference assumes the client is not connected. The message is then saved to the database. After the next client and server are connected successfully. Take out the data and send it to the client.
and deletes the message from the database. But this approach has been optimized. However, in another case, the message cannot be reached at all, when the client disconnects from the server. When the server sends the message, unaware that the client has been disconnected, the message sent out is unreachable, and a second optimization is done to solve the problem.
Second optimization: In order to solve the above problem, the policy is: Client receipt message to the server. This message is saved in the database each time the server sends a message to the client. Suppose that when the client receives the message, it also sends a message to the server at the same time, telling the server that I have received the message. The server then deletes the message in the database.
Android Push Push message arrives success rate optimization