konturgestaltung
konturgestaltung

Reputation: 467

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

Upvotes: 4

Views: 832

Answers (1)

Arun Taylor
Arun Taylor

Reputation: 1572

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.

Upvotes: 5

Related Questions