Javascript-how to ensure data integrity and relieve the insertion pressure when submitting data to the interface multiple times?

Source: Internet
Author: User
Ajax is used to collect document data by date. The number of articles per day is not certain. A few, thousands or tens of thousands. One commit cannot submit data of one day to the server at a time. 1. assume that 1000 articles are submitted, which are divided into 10 submissions. each time 100 articles (about 80 k) are submitted, how can we ensure the most... ajax is used to collect document data by date. The number of articles per day is not certain. A few, thousands or tens of thousands.
One commit cannot submit data of one day to the server at a time.
1. assume that 1000 articles are submitted, which are divided into 10 submissions. each time 100 articles are submitted (about 80 kB), how can we ensure that the server end saves these 1000 articles to the database (which cannot be repeated )?
2. if multiple clients submit data at the same time, how can we relieve the database insertion pressure?

Reply content:

Ajax is used to collect document data by date. The number of articles per day is not certain. A few, thousands or tens of thousands.
One commit cannot submit data of one day to the server at a time.
1. assume that 1000 articles are submitted, which are divided into 10 submissions. each time 100 articles are submitted (about 80 kB), how can we ensure that the server end saves these 1000 articles to the database (which cannot be repeated )?
2. if multiple clients submit data at the same time, how can we relieve the database insertion pressure?

You can first give all the article IDs, and then the server will use these article IDs to check if they are not so rigorous. you can just give the total number of articles to be updated, and then the server will finish updating to verify if the total number of articles has been updated.

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.