"General Technology" real-time network response requirements for mobile app network time-out settings

Source: Internet
Author: User

From the operation of the fixed reading number of thinking, search attention to get more content!


The network status of a mobile device's product depends on the network environment in which the user is located.

This network environment will also change the location of the root with the user.

It is also possible that the previous second is under the WiFi network, this second 4G, after a while the signal becomes weak or no signal.

So, for the product of real-time requirements of high-quality products, how to set this timeout length?

Such as speech recognition products, there are several product characteristics, network performance of the impact of the more

1, upstream data volume is larger

2, the time the server processes the data, depending on the amount of voice data uploaded

3, the process of speech recognition is a continuous process, a complete speech recognition process

4, users of the product in real-time requirements of high

At this point, the network timeout length setting cannot be executed in a maximum value mode.

1, when the network signal is unstable, we need to inform the user quickly, because the network status causes the recognition process error, reduces unnecessary waits.

2, regardless of any network status, any amount of data, we need to ensure the validity of this network request.

3, summed up a sentence, as long as this time-out accurate, the above problem can be solved!

See here, presumably we all have a certain way of thinking

Here are some examples of how you might train

1, get the current network type, and get the network speed of the network type according to the network type N.S

2, get the actual amount of data uploaded by the client c.d

3, data volume C.D and speed n.s ratio, to get the time spent uploading data c.d.t

4, with the server to determine the amount of processing unit data and spend time value S.P.D,

5, the amount of data c.d and the amount of data per unit S.P.D Association, the server spent time s.p.d.t

6, estimate S.D for server return data

7, data volume S.D and speed n.s ratio, to get the time spent uploading data s.d.t

8, then the total time-out can be c.d.t + s.p.d.t + s.d.t (upload data time + processing data time + data time)

9, may also be supplemented by the establishment of joint time

10, some fault-tolerant time-length buffer

In this way, the super-time length becomes more accurate, regardless of the amount of data sent, the network is what, the transmission becomes more reliable.

Similarly, the program can also be applied to other similar scenarios, optimized according to product requirements and technical dependencies.


Complementary: Similar functionality, you can also try to use a subcontracting strategy to reduce the failure rate of a single network request, reduce the total length of time, welcome to read and Exchange


From the operation of the fixed reading number of thinking, search attention to get more content!

This article is from the "Grow And share" blog, so be sure to keep this source http://liujunqi.blog.51cto.com/5768726/1768475

"General Technology" real-time network response requirements for mobile app network time-out settings

Related Article

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.