lessons learned in lookout location services

10
LESSONS LEARNED IN LOOKOUT LOCATION SERVICES JeWatts, Lookout, Inc.

Upload: lookout

Post on 15-Jan-2015

1.247 views

Category:

Technology


0 download

DESCRIPTION

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.

TRANSCRIPT

Page 1: Lessons Learned in Lookout Location Services

LESSONS LEARNED IN LOOKOUT

LOCATION SERVICES Jeff Watts, Lookout, Inc.

Page 2: Lessons Learned in Lookout Location Services

Locations @ Lookout

•  Collect locations in several scenarios: •  User-initiated •  Signal Flare •  Lock Cam •  More to come…

Page 3: Lessons Learned in Lookout Location Services

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

Page 4: Lessons Learned in Lookout Location Services

So what have we learned?

Page 5: Lessons Learned in Lookout Location Services

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

Page 6: Lessons Learned in Lookout Location Services

2. Know your accuracy threshold

•  Get there and stop listening

Page 7: Lessons Learned in Lookout Location Services

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

Page 8: Lessons Learned in Lookout Location Services

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)

Page 9: Lessons Learned in Lookout Location Services

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

Page 10: Lessons Learned in Lookout Location Services

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