Tom Morris

22 January 2010

A pungent mix of programming, philosophy, pedanticism, procrastination, perplexity, peripheral political polemic, and platters of preposterousness.

Location-based services: turning useful metadata into trivial games

There’s been a lot of to-do recently about Foursquare, Gowalla, Yelp and other services which are now “doing location”. Most of them are totally dumb and uninteresting. Or actually, they aren’t. I’ve tried out Foursquare now that I’ve got an iPod touch and a MiFi with GPS. The problem with location-based services so far is that they are just that - services.

It’s like talking about “Internet-based services” or “food-based restaurants”. It’s so dumb. The interesting thing about location isn’t giving your location data to some company who then tell you something interesting. No, it’s what happens when we get a widely distributed location system working. The closest thing I’ve yet found to a great location-based service is FireEagle. Why? Because they just provide the infrastructure, and not the social network, or any of that stuff. Basically, a set of tools you can build on top of. Obviously, there’s a problem with FireEagle - it’s rather difficult to tell people “hey, you should update this location service which is only a meta-location service so that stuff that’s built on top of it can all be updated”.

So, how do we get around this problem? The W3C have produced the Geolocation API. This is okay, but it’s client-side specific. The machine that works out where I am is not necessarily the same device I’m using to look at a website. With FireEagle, I update it using both the command line ‘fe’ client I’ve written and using Sparrow, the iPhone/iPod touch client. Now, I’m sitting writing a blog post in Vim. When I send this blog post off to my server, it will ask FireEagle where I am, and if I weren’t at home (I am), it’d get my location and append it to the blog post. You can’t do any of that with the Geolocation API, because there is no point in the process where I load a specific web page.

For a geolocation service to really be of much use, it needs to be input-agnostic. One way I update FireEagle is I have a script which sits on my Linux box, and whenever I SSH in, it checks where I am SSHing from. I’ve set a list of default places I SSH in from - and it uses that to update my location. Input agnosticism means the location service needs to not care how it gets the information. This is tied to device agnosticism. Don’t require me to carry a GPS around. Detect what I’m doing and make sensible inferences (that is, strongly prefer making no inference to making false inferences).

Location-based services currently seem to all require explicit checkin. Foursquare and Gowalla both do this. Why is this necessary? Use all those latent signals and just work out where I am. Technology is supposed to work for me, not me for it. Services like Foursquare and Gowalla sugar this pill by providing useful contextual information - stuff nearby I might be interested in, the game aspect of becoming mayor of a place, getting points and competing with friends. That’s all fun, but you can do that on top of the infrastructure level.

How could we build this infrastructure? Simple. People have websites. Not everyone has websites, yeah, but let’s not think about that. People have websites. So, you declare a specific URI to get one’s location from. How about, oh, I dunno, /location? You can use all the magic of OAuth, SSL certificates, HTTP authentication and whatnot to keep the relevant people in and out. As for format? That’s easy. You write a script which serves the location up in all relevant formats. Off the top of my head, that would mean HTML with the geo microformat (and maybe RDFa with the wgs84 schema), RDF with wgs84, KML, any of this lot you particularly care about, and maybe RSS/Atom to give a previous checkin history. You also provide Web Hooks, so anyone can register to get an update in their favourite format. Updating? Simple. The owner of that particular location node can simply POST his location to that address.

This puts me in charge of my location data. This is good. You may have very simple rules about how you want your location shared. I don’t. I’m picky about my privacy. I want to be able to be vague. Vague is useful. If you know that I’m in the United Kingdom rather than in Japan, you can, oh, not offer me stuff that would only be of interest to me if I’m in Japan. Same for city. Similarly, when I’m at home, I’m perfectly happy with you knowing that I’m at a place called “home”. I’m not happy with you knowing where that is. Yes, you can probably find out, but I’m not up for broadcasting my home address on all the social networks. If I’m at a BarCamp, I’m perfectly happy to tell you that I’m there. If I’m wandering around a sleazy Soho sex shop, that isn’t going on Facebook if I have any say in it. Location data is contextually relevant. I have yet to find a way on Foursquare of setting up a ‘secret place’ - my home, say - so that if friends are here, they can share that they are here, but without sharing exactly where they are.

Not identifying where you are, but identifying that you are at a particular place is where we get into identity issues. If I say “home” and you say “Tom’s house”, we need to be talking about the same thing. That’s pretty easy. We forge a URI like /house and specify identity relationships using owl:sameAs. Yeah, yeah, RDF, I know - if you don’t like it, well, you know what I’m going to suggest, so I won’t even bother. Anyway, those formats should be able to specify that you are at a particular place, even if you leave it completely vague as to where that is. That you don’t know where something is doesn’t mean that you need to get a more powerful GPS - sometimes vagueness is intentional.

As for the business side of it? Whoever you trust as your identity provider (I’ll hold some old-fashioned views about it being the same people who host your .plan file and your e-mail, but that’s just because I’m old-fashioned) - they are the people to trust your location to. For those of us who care about freedom, that can be us. But if you think about location in the way I’ve suggested, location will just become an add-on for OpenID, for having a website - it’s part of your identity, not part of someone else’s service. I’m planning to build a ‘personal server’ - basically a load of software you can install on a Linux box that provides your whole online identity. I’m hoping to load into that all my preferences about this, and everything else. Why? I’m fed up with being a pawn in a giant game of vendor sports. If we try hard enough, we can free ourselves from Twitter, Facebook and all these other services that try and own a chunk of us, and we might be able to build something cool at the same time.