How to deal with concurrent ticket grabbing in 12306?

WBOY
Release: 2016-09-29 09:19:10
Original
1124 people have browsed it

The company has a business of grabbing orders, which needs to be implemented on the website.

The solution I designed myself would like to ask everyone if it is feasible. If not, is there a more mature solution?

My plan: After the request comes in, first determine whether the current time is within the order grabbing time. If so, modify the order grabbing person id in the cache, indicating that the order was grabbed by the order grabbing person, and then modify the order grabbing allowed time to false.

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