Answer the question
In order to leave comments, you need to log in
How would you make a backend for such an application?
Essence of the question. You need to make a back for the application. Among other things, there is such a task. The client, for example, every 30 seconds will send data about its position via API, these coordinates are recorded in the database. Then a request is sent to show everyone who is nearby, for example, 100 meters away. It is clear that sorting through all the coordinates in the database and comparing with the coordinates of the client is nonsense.
Hence the question of how this can be implemented.
Please do not breed holivar about the choice of language)). This is not a project for sale, but a training project. And it will definitely be done in PHP, most likely in Laravel.
Thanks
Answer the question
In order to leave comments, you need to log in
postgresql can work with geodata, I did this even on cut sqlite on android, any database will do for a training project
Not exactly what the author wanted, but suddenly someone wants to know how it works from the inside
https://medium.com/@agafonkin/a-dive-into-spatial-...
Index values by which square of the map they belong to. Those. we divide the entire map into areas (squares) of a certain size and, when data arrives from the client, we check which square this data belongs to. When the client asks for someone within the radius, we give him data from the neighboring N squares, if necessary, we go over this data and calculate the distance to each.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question