Lessons Learned in Lookout Location Services was originally presented at Lookout's Scaling for Mobile event on July 25, 2013.
Jeff Watts is a Senior Software Engineer at Lookout, Inc. Jeff's talk focused on considerations that should be made when setting up location based services.
Lookout has grown immensely in the last year. We've doubled the size of the company—added more than 80 engineers to the team, support 45+ million users, have over 1000 machines in production, see over 125,000 QPS and more than 2.6 billion requests/month. Our analysts use Hadoop, Hive, and MySQL to interactively manipulate multibillion row tables.
With that, there are bound to be some growing pains and lessons learned.
2. Locations @ Lookout
• Collect locations in
several scenarios:
• User-initiated
• Signal Flare
• Lock Cam
• More to come…
3. Lots of ‘em
• Millions of location requests per day, and
growing
• Most locate commands result in multiple
locations being obtained and sent from the
device
• Devices have multiple location
providers (cell, wifi, GPS, etc.), with
varying accuracies and time to get a fix
5. 1. Speed counts
• Faster fixes = happier users
• Get the first fix you can reasonably use,
refine later
• Passive location provider is useful for this
• Network location provider is faster than
GPS, but with lower accuracy
6. 2. Know your accuracy threshold
• Get there and stop listening
7. 3. Raw cell tower info is rarely useful
• Caveat: the previous point
• Very low accuracy (~1 mile)
• You’ll need another service to translate
CellID info to latitude and longitude
• But fast! (see point 1)
• Easy on the battery, too
8. 4. Mind the battery
• Don’t use GPS if you don’t have to
• Passive location provider is nice, if you can
get what you need from it
• Network providers (cell, wifi) are easier on
the battery than GPS
• Can get pretty good accuracy with assisted
GPS, using network provider (requires GPS
chip on device, though)
9. 5. Better APIs will make your life easier
• If device has Google Play services, you may
be able to use fused location provider on
Android, which hides most of this
complexity from you
• Similar API for iOS, available on all devices
10. 6. Be nice to your DB
• Keep writes fast, index judiciously
according to your app needs
• Multiple locations sent from a device for
each location request
• Probably don’t need to keep all of them
• Figure out how to group related
locations