views:

243

answers:

4

Hi everyone, I am interested in extending my website to provide a service which involves users "check in" in my university's campus. Since Location Based Services (LBS) is pretty new, and there are not much literature around that could provide relevant interests to this matter, I have the following questions to ask:

First, I know that I have to design an Android App and possibly an phone app application. For all I am guessing, foursquare is simply using the client to send data to their webserver back and forth.

  1. What are the standard protocols for the client to communicate with the webserver? (or is it simply just json or xml?)
  2. What kind of special web service do they use on their backend? (Like some research would reveal they are using LIFT, written in Scala which is something that I am not familiar with.).
  3. I know python pretty well. Are there webservers, i.e. django or pylons, that provide similar service to 2) above?
  4. How difficult is this really?

Also, any literature on this subject matter is greatly appreciated.

A: 

Really? No one knows about this? How state of the art is the foursquare backend?

confused
@Macatomy I am actually not interested in using their API. I want to know how to build one and the logic behind it.
confused
+1  A: 

Use the foursquare API.

They have pre-made libraries for both Django and Python here, those should make it easier to integrate foursquare into your website.

macatomy
A: 

Well, I do think a good first step would be to look at Foursquare's API, both to see if you can simply integrate with their service (i.e. look for check-ins that are to campus buildings or whatever) or just to get a picture of what they're using. Their API seems like a pretty standard web service using XML or JSON, which seems like a good practice for you as well.

There are some challenges in building a scalable web service that will handle geographic data: you'd want a database that can handle geospatial indexing for you (otherwise the algorithms can get a little complex). If you're familiar with Django, GeoDjango might be a good fit for you. I hear that Foursquare is actually switching to use MongoDB, which has some geospatial indexing features: they're likely using a NoSQL database because of their unique scaling issues which you probably don't need to worry about.

npdoty
A: 

Mimicking foursquare isn't a good approach. A solution to your specific functionality needs and load levels will always be custom, not copied. Even the biggest university campus in the world, with every single person using the service, you'd be totally dwarfed by foursquare's user base. So whatever they're doing is WAY higher-end than what you need.

For your purposes, a simple web service is probably more than adequate. I'm building apps that are location-sensitive (arts/cultural events and consumer offers local to the user's current position) right now that hit PHP scripts with query string or posted-data arguments, and consume JSON. Nothing fancy, but I can handle the load on the server side with lightweight technologies I already know, and I know it'll scale to meet my actual load.

Don't be beholden to the way somebody else does it, even if they are the industry leader. Their needs aren't your needs.

Dan Ray