Reputation: 364
How does app like Uber do real time tracking of Cabs? Let me put it across in detail:-
I have gone through many blogs, after that I could think of the solution below to solve the 2 issues:
Is there a better way to do it? Please give your insight about the issue.
Upvotes: 1
Views: 5589
Reputation: 2092
I have the same issue here for my app, where drivers send their locations in a MySQL table in a server.I think the best way to do this is WebSockets, to create a connection between the server and client and send the new location everytime when changed. I really don't know if is the best approach but i will try to do this, maybe can help you also. I'm using PHP so i will try with Ratchet:
Upvotes: 0
Reputation: 7511
i think each cab will be fitted with a GPS tracker(could be mobile based app also NOT SURE) to track and send real time data, once the location data changes a TCP connection established will be used to communicate.
Upvotes: 0
Reputation: 55
I think cabs do not communicate to the server or vice versa, until there is some client/passenger who pin his location and destination. The request of client is sent to the server, then server looks for the cab that is closer to the client/passenger. There is quite possibility that they are using GCM Google Cloud Messaging Service of google.
Upvotes: -1