当前位置:网站首页>Thoughts on the optimization of examination papers in the examination system

Thoughts on the optimization of examination papers in the examination system

2022-04-23 19:15:00 Sound God

In daily life , There will be a large number of users taking exams online , Enter the test paper 、 Answer the questions 、 Submitting test papers is the link with the largest number of users .

Pain points

More users enter the test paper and the loading time is too long , Slow system response ; Many people submit test questions and papers at the same time, and always modify the database , The database is under too much pressure .

The optimization idea is divided into three points

1. Procedural optimization
2. Database level optimization
3. Add server configuration

Enter the test paper

1. Entering the test paper can put the data into the cache , For example, use Reids.
2. Add indexes to data table fields .
3. Pre generated user test paper static page .

Submit test questions

1. Each time you submit a test question, you can put the data into the cache , such as Reids cache .

Submit test papers

1. When submitting the test paper, you can print the test question data and cached data into the log , Prevent data from being retrieved in case of error .
2. It is suggested that when the test paper is prompted at the end , Submit the answer of the test question again as a whole , Prevent the answers to the test questions from being lost . Compare with the data in the cache . Missing data , Fill in with the data submitted as a whole .
3. Finally, the test questions in the cache 、 And test paper data , Put it in the message queue , To execute asynchronously .

版权声明
本文为[Sound God]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231913518354.html