Hello, we have an app that sends the location of users to the server every 15 seconds. Currently it's a simple (lat / lng) POST in the API, would there be a better way to do this?
Any specific architecture?
Hello, we have an app that sends the location of users to the server every 15 seconds. Currently it's a simple (lat / lng) POST in the API, would there be a better way to do this?
Any specific architecture?
I do not think there is a specific architecture for this, I'll just make some recommendations.
It is interesting to save positions within a table in SQLite within the app itself for times when there is no internet available and download them to the server when there is. This is called buffering. I suggest the following procedure:
Every 15 seconds:
Warning for the capture date-time, it is different from the date-time of sending and the date-time of the arrival on the server. It might be interesting for you to treat these values as different things.
Moreover, the approach seems ok.
Consider saving as much information as you can about each position (date-time, lat, lng, altitude, speed, direction, IMEI or other device identifier, etc.). >
If the number of users grows too large, you may need to be careful about the upload frequency so as not to overload the server (reduce to a time interval of between one and five minutes, for example).