PHP - This requirement does not require redis. Can table locks be used to solve the concurrency problem?
PHPz
PHPz 2017-05-16 13:09:48
0
1
358

Requirements:

Due to a large number of businesses, a company needs to make an appointment in advance. It can be done in six time periods every day: 9:00, 10:00, 11:00, 15:00, 16:00, and 17:00. reserve.
Only 10 people can make reservations in each time period, that is, 60 people can make reservations every day.
Only one reservation can be made per person.
Successful reservations need to be sorted, for example, the first person in the 9:00 time slot is 001, the first person in the 10:00 time slot is 011, and the last person in the 17:00 time slot is 060.
Appointments can only be made for tomorrow and the day after tomorrow. 
PHPz
PHPz

学习是最好的投资!

reply all(1)
巴扎黑

Let’s use redis to solve the problem. Wait for a certain period of time and then write the data in redis to the database in batches

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template