Storing Mobile Location Data: Snapshot vs History

Real Time Location Tracking

Many mobile apps are location-based. They continuously track the mobile user via his/her mobile GPS, and provide content to the mobile app based on its location.

Real time tracking continuously transmits location data to the server from many mobile devices. When such data arrives at the server, it is used on a real time basis : where is the device now? But, it is also used track location over an extended period: which route was taken?

Two Types of Location Data

  • Snapshot : snapshot of mobile devices location at current moment
  • Historical : time series of locations of each mobile device

Besides the obvious use of historical location data to present tracks to users, with the increasing use of machine learning and data mining, they are critical for the organization providing the mobile app. For example, an Uber like company will use historical data to learn and predict good travel routes.

Storing Location Data

Storage of the two types of location data should be integrated, because real time data becomes historical data, once the next location is received from the mobile device. However, the access pattern for the real time and historical data is different.

For real time location data, we want to retrieve those devices within a given region. So we are interested in filtering a flat collection of records. While for historical data, we want for presentation to retrieve whole a time series, or a slice of. And for machine learning and analytics we want to retrieve and filter on a collection of time series, according to properties of the time series as a whole, or properties of a slice of the time series.

These different access patterns, imply a different choice of storage engines for the two types of location data.

Storage Engines for Location Data


Should have support for spatial data types (not an exhaustive
List, just those that I commonly use):


Should have time series support (not an exhaustive
List, just those that I commonly use):