How does app like Uber do real time tracking of Cabs? Let me put it across in detail:-
- Cabs Position to the server.
- Server then communicates that positionto the another user app which is trying to book a Cab.
I have gone through many blogs, after that I could think of the solution below to solve the 2 issues:
- Cabs will communicate there lat/long to server after some time gap using http request.
- The user app will establish a socket with the server and any change in the server will be communicated to the user app through that socket.
Is there a better way to do it? Please give your insight about the issue.