简体   繁体   中英

Best practice for sending live location data to server from iPhone

I want to develop an application for the iphone, that tracks the current position of the user in "realtime" and sends this data to a sql database on a webserver by a web service, so I will be able to have a consistent database where the registered users a currently positioned.

This is raising some questions on how to do this in an efficient way.

1) Shall I really update the GPS data in realtime on the server? Isn't this to "heavy" regarding energy consumption on the iphone? Maybe once a minute does it as well? What are best practices here when I want to be as accurate as possible?

2) What if there a maybe 1000 users at once.... is this still efficient to update a database with the current GPS data simultaneously?

Thank you in advance Sebastian

Sending GPS data at regular time intervals will put extra load on the system unnecessarily and it is not optimal.

A better way to track the user is to send data only when the user has moved outside a circle of radius R from the last reported location.

That way a user moving in a car at 60 mph on a highway and one walking at 0.1 mph in a park will both be tracked accurately.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM