How does the e-commerce website automatically acknowledge receipt?
Timed scripts to achieve, real-time monitoring, server cost is relatively large, fixed-point to run, time is not accurate, how to achieve???
Reply content:
How does the e-commerce website automatically acknowledge receipt?
Timed scripts to achieve, real-time monitoring, server cost is relatively large, fixed-point to run, time is not accurate, how to achieve???
You can write the code in the home page, every time someone visits the site to check whether there is a need to determine the receipt of orders, timed up and down the shelf is doing this
Automatically confirm receipt This state if only let the client to see, and so on the next time the user to go online, do an operation on it.
If there is any other use, it is recommended to separate the use.
Daily scheduled midnight filter the next day can automatically confirm the receipt of orders
And then the next day, every 10 minutes, to confirm the receipt cost is not too big. Time is also relatively accurate
The delivery person confirms that the receipt has been delivered.
The customer does not have the confirmation receipt, does not represent is automatically confirms the receipt.
Define a final automatic receipt time this thing, by the time of the order and the time to operate. The first time after this order has timed out in front of people (any way), modify the state.
If you want to implement PHP, timed scripts should be the best choice, although the performance and consumption of a little higher, but high reliability, and other modules and pages are not coupled.
However, the best way to do this is in the form of a daemon, which may require the support of other programming language programs, in the daemon, you can set up a complex data model such as queues, and can communicate with the request handler, it can solve the problem of performance consumption and waste in timed script polling.
Can be handed to the messaging service to push Https://www.aliyun.com/product/mns regularly