Use ajax to collect article data by date. The number of articles per day is not necessarily certain. It may be a few articles, or it may be several thousand or tens of thousands.
One submission cannot submit one day's data to the server at once.
1. Assume that 1,000 articles are submitted, divided into 10 submissions, each of 100 articles (about 80k). How to ensure that the final server saves these 1,000 articles to the database (cannot be repeated)?
2. If multiple clients submit data at the same time, how to alleviate the insertion pressure on the database?
Use ajax to collect article data by date. The number of articles per day is not necessarily certain. It may be a few articles, or it may be several thousand or tens of thousands.
One submission cannot submit one day's data to the server at once.
1. Assume that 1,000 articles are submitted, divided into 10 submissions, each of 100 articles (about 80k). How to ensure that the final server saves these 1,000 articles to the database (cannot be repeated)?
2. If multiple clients submit data at the same time, how to alleviate the insertion pressure on the database?
You can give all the article IDs first, and then the server checks them through this batch of article IDs. If it is not so strict, you can only give the total number that needs to be updated, and then the server verifies whether all the updates have been completed after the server updates it