S
S
Sergey Grigorov2018-04-16 23:00:04
JavaScript
Sergey Grigorov, 2018-04-16 23:00:04

Who will help solve a number of issues on tips and pools?

Hello. I know, today I already asked questions, out of curiosity it was all to blame.
Questions:
1. Some project A has a service for geolocation. It was created for people who are looking for transport/fellow travelers.
User data (authorization, name, etc.) is taken from the API. Maps - Google Maps.
At the moment, the coordinates are requested from the user every second, sent to the database, saved, and from there every 1-2 seconds they are taken by each user in his field of view (the coordinates of the lower left and upper right corners of the map) and immersed.
The question is this.
I think that this option will greatly affect the speed of work with the growth of online, if not put the system to hell. Therefore, is it possible to somehow organize something like a P2P network between online users to exchange these coordinates and Realtime display them in the visibility zone?
I would be grateful if someone could share an answer/code example/article on this topic.
Thanks in advance.
PS At the moment, authorization data is being collected on the page, data about marks on the map is also taken by AJAX from the API on request api.project.com/v/1.0/maps.getPoints?lat={lat}&long={long} , where lat and long are the coordinates of the corners of the map.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Grigorov, 2018-04-16
@Serjio-Grig

Judging by the lack of answers, either no one has come across, or they don’t want to share.
Decided to dig towards Socket.IO. So far, I have encountered the problem of organizing channels due to coordinates, but I think the solution is simple and trivial - dragging an area by geocoding and creating channels by area.

S
Stalker_RED, 2018-04-17
@Stalker_RED

Yes, with a large number of users, the load can be quite significant.
Browser p2p is done via webrtc, not websockets, but in general you should reconsider the whole approach.

and from there every 1-2 seconds they are taken by each user in the area of ​​his visibility (the coordinates of the lower left and upper right corners of the map) and are immersed.
So any dude with fake-gps can track all users of the service in real time? Great plan!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question