Building a service for my website that has some foursquare features
Asked Answered
D

3

7

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.

Diaphony answered 3/7, 2010 at 16:33 Comment(4)
You shouldn't assume that everyone will recognize your acronyms or product names. What is "LBS" and "Foursquare" in this context? I could google but I shouldn't have to.Dirndl
Foursquare? I thought everyone knew it's a Geo-Social Networking site. And that clues LBS, of course: Location-Based Services.Chari
@Dirndl I did have "Location Based Services (LBS)" ...Diaphony
you didn't when I posted. That was added in a subsequent edit (which is not a problem.) I just think its important to remember that not everyone looking at your post understands the context of acronyms and product names. This is a big business with a lot of niches. For example, I do very little social networking programing and I didn't recognize the acronym and product despite my 12k rep. You're more likely to get answers if take care to make your questions explicit and provide links when they are useful. That is just advice, not a criticism.Dirndl
L
2

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.

Lipread answered 5/7, 2010 at 0:47 Comment(0)
L
2

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.

Loopy answered 8/7, 2010 at 1:25 Comment(0)
C
0

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.

Counseloratlaw answered 8/7, 2010 at 11:0 Comment(5)
Dan, any detail on the lightweight technologies that you were/are using for the app that you mentioned? database, language, framework etc, what are you using?Lambaste
MySQL and PHP on a LAMP server. I have a hand-rolled ORM that I'm using (though it doesn't take much query complexity to blow its little mind and require manual SQL coding).Counseloratlaw
I read that MySQL is not fit for transactional web calls (a lot of updates and reads), are you fine with that? did you compare with other database solutions?Lambaste
You have to know how to use it and how to optimize it, but that's no different from any other database. I've backed this kind of service with MySQL for years and years now. I have first-hand evidence that MySQL can handle a high-transaction environment.Counseloratlaw
cool! Where did you get your location info from - not only just lat and long, but also the street and even venue info at the location?Lambaste

© 2022 - 2024 — McMap. All rights reserved.