The Hexagonal Code: How Uber Finds You Fast!

Have you ever wondered how Uber magically finds a driver near you within seconds of booking a ride?🤔

where my night 2AM brain cells are decoding this after some of research i got this:

So suppose this is you🧍and these are the drivers around…


This content originally appeared on DEV Community and was authored by Sanket Kalekar

Have you ever wondered how Uber magically finds a driver near you within seconds of booking a ride?🤔

where my night 2AM brain cells are decoding this after some of research i got this:

So suppose this is you🧍and these are the drivers around you

Image description

Uber uses a thing called hexagonal index So what it does is it divides the entire map into hexagons So you are in a hexagon So it will search in all the hexagons that are near you to see if it finds a driver or not

Image description

Now it is possible that you are covering a lot of area and we have to find more drivers nearby So what it does is it breaks these hexagons into smaller hexagons so that it will be able to find very close drivers,

Image description

So simply you can imagine how it will be suppose we first looked at the big hexagons to see how many are there around you this is how it works.

but still in confuse why hexagons why not did we use triangles and squares?

Image description

if you look at one hexagon, the adjacent hexagon the distance will be equidistant if you look at it from the center but this doesn't happen in a square or triangle now how are these hexagons stored?


This content originally appeared on DEV Community and was authored by Sanket Kalekar


Print Share Comment Cite Upload Translate Updates
APA

Sanket Kalekar | Sciencx (2024-09-13T10:18:11+00:00) The Hexagonal Code: How Uber Finds You Fast!. Retrieved from https://www.scien.cx/2024/09/13/the-hexagonal-code-how-uber-finds-you-fast/

MLA
" » The Hexagonal Code: How Uber Finds You Fast!." Sanket Kalekar | Sciencx - Friday September 13, 2024, https://www.scien.cx/2024/09/13/the-hexagonal-code-how-uber-finds-you-fast/
HARVARD
Sanket Kalekar | Sciencx Friday September 13, 2024 » The Hexagonal Code: How Uber Finds You Fast!., viewed ,<https://www.scien.cx/2024/09/13/the-hexagonal-code-how-uber-finds-you-fast/>
VANCOUVER
Sanket Kalekar | Sciencx - » The Hexagonal Code: How Uber Finds You Fast!. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/09/13/the-hexagonal-code-how-uber-finds-you-fast/
CHICAGO
" » The Hexagonal Code: How Uber Finds You Fast!." Sanket Kalekar | Sciencx - Accessed . https://www.scien.cx/2024/09/13/the-hexagonal-code-how-uber-finds-you-fast/
IEEE
" » The Hexagonal Code: How Uber Finds You Fast!." Sanket Kalekar | Sciencx [Online]. Available: https://www.scien.cx/2024/09/13/the-hexagonal-code-how-uber-finds-you-fast/. [Accessed: ]
rf:citation
» The Hexagonal Code: How Uber Finds You Fast! | Sanket Kalekar | Sciencx | https://www.scien.cx/2024/09/13/the-hexagonal-code-how-uber-finds-you-fast/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.