Best practices for sending location data to a server from iPhone

I want to develop an iphone application that tracks the user's current position in real time and sends this data to the sql database on the web server using the web service, so I can have a serial database in which registered users are currently located .

This raises some questions about how to do this in an effective way.

1) Do I really need to update the GPS data in real time on the server? Isn’t it “hard” regarding the power consumption of the iphone? Maybe once a minute it turns out? What are the best practices here when I want to be as precise as possible?

2) What if there are, possibly, 1000 users at the same time .... is it still effective to update the database with current GPS data at the same time?

Thanks in advance Sebastian

+4
source share
1 answer

Submitting GPS data at regular time intervals will overload the system unnecessarily.

The best way to track a user is to transfer data only when the user has moved outside the circle of radius R from the last reported location.

Thus, a user traveling in a car at a speed of 60 mph on the highway and one traveling at a speed of 0.1 mph in the park will be accurately tracked.

Users are known to stop moving when they sit down to eat, go to the bathroom or sleep.

+5
source

Source: https://habr.com/ru/post/1446899/


All Articles