The push and pull of the online game data

Source: Internet
Author: User

The client should be allowed to decide how to get data from the server.

1. Pull mode: send when requested.
2. Push way: The server sends out voluntarily.

The client can set the way.
If the client enters a simplified mode and does not need to display the surrounding players, it is set as a request to send the surrounding player information.

Take position synchronization information as an example:
Assume that the server sets the refresh interval for the location synchronization information within the 100-1000m range to 3s.
The client can choose the following refresh mode independently:
1. Actively request to the server at intervals not less than 3s. For the view edge, the refresh interval can be 10s.
2. By the server to send the initiative, the interval of 3s.

Can be set according to the range, such as set near the 5m range is the push mode;
It can also be set by goal, such as setting all your friends ' data in a push mode.

The client can set all data to be sent by the server voluntarily to obtain the richest data.
However, because of bandwidth and client-side processing capabilities, some of the less important data can be selected for pull queries.

(reprint please indicate the column from Jin Qing)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.