How to ensure the integrity of large amounts of data in ajax post?

WBOY
Release: 2016-08-04 09:21:05
Original
1259 people have browsed it

Using ajax post to post a large amount of data, such as 100,000 orders, how to ensure that all 100,000 orders are eventually received.
Avoid retransmitting all orders when individual orders are not received.


is the data obtained by js, and the data needs to be submitted to the server-side interface.
It is impossible to submit 100,000 yuan at one time.
But you can submit 500 items at a time.
The problem is that 500 items need to be submitted 200 times. If you verify whether all the final data has been received. What kind of mechanism can avoid having to resubmit all data when one of them fails.

Reply content:

Using ajax post to post a large amount of data, such as 100,000 orders, how to ensure that all 100,000 orders are eventually received.
Avoid retransmitting all orders when individual orders are not received.


is the data obtained by js, and the data needs to be submitted to the server-side interface.
It is impossible to submit 100,000 yuan at one time.
But you can submit 500 items at a time.
The problem is that 500 items need to be submitted 200 times. If you verify whether all the final data has been received. What kind of mechanism can avoid having to resubmit all data when one of them fails.

ajax can’t do this either. You should write an interface. This thing is another set of things, not something ajax does. Moreover, even the interface cannot submit so much data at once, it must be submitted in batches

Your example cannot be answered. No one can handle 10W at a time... It would be nice if you passed it and compared it and returned the missing ones.

This should be served separately. Ajax is not suitable for large and intensive calculations

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template