I am building an application for blue collar workers for them to find jobs and small gigs.
I am building algorithm to give list of workers to customer/employer. First sort is workers only in the radius of 7kms from customer's location.
I dont understand which db should be used and how often location should be updated:
Approach 1: permanently store a location :
Store location using spatial index and point(longitude latitude) in MySQL
Advantage: live location is only available until user doesnt close the app so this Approach doesn't give a false past location as current location.
Disadvantage: what if worker isnt actually available and is out of town the algorithm would still consider the worker
Approach 2 : Use live location by using websockets + redis
Advantage: Accuracy
Disadvantage: live location is only available until user doesnt close the app so this Approach will give false live location.
Whats the solution to this?
