Introduction
With Glover v 1.6.6 we are reintrucding the firebase cloud functions to help improve the driver auto-assignment.
There are already 2 ways the auto-assignment works.
1. Through VPS server
In this case your backend must be running a vps server for the taxi order, in order for your to run supervisor which is needed to handle the auto-assignment in a queue without affect the backend loading state, while the regular order uses schedule to call the assignment once every mintue.
With this case, the server fetch nearby driver from firestore base on the trip pickup point(taxi order) or the vendor address(for regular orders).
PROS
Its fast
can handle driver rejecting order and move order to next nearby drivers
CONS
The system uses earth distance to find nearby driver, in most case it fails to actually differeciate the nearby from the far drivers
2. Through Driver App
In this case your backend must also be running on vps server(taxi order) while regular order uses schedule/cron job, but the server just create an order collection record on the firestore and the driver app fetch the order, then check if the order is within the driver location before showing an alert on the driver app about nearby order.
PROS
very fast
driver almost never miss an order
CONS
Its very expensive to use in large scale usgae, because there will be alot of firestore read from the driver app, even is the driver can't handle the order because of distance/range.
Its difficult to handle ignore/reject order and moving to the next driver
Now have the new auto-assignment flow that combines both flow above to get a much more perfect result at very low cost/usage on the firestore
Last updated