I am creating a Taxi App, In which, when user order a taxi, three nearby driver are selected by system, and it sends a request to first driver.
Now driver will have 30sec to accept or decline the booking, if driver accepts then booking is confirmed and no other driver will be notified,
But if driver decline booking or didn't respond to the booking in 30 sec, a request will be send to second driver.
Now the problem is that, I don't know how to manage a action queue in which there are three conditions.
-
If system don't get a reply from first driver in 30 sec, send request to next driver in queue
-
If driver accept the booking the stop the queue process and book a ride.
-
If driver decline the booking, then instantly send request to next driver without waiting for 30sec period.
Any suggestion and Ideas are welcome.
via Puneet Singh
No comments:
Post a Comment