Database Recommendations For GPS Game?

Plan: I am developing a fairly straightforward app using the GPS on a users phone to “tag” a location (similar to Yelp and numerous other geo-apps). When not being used for tagging, the app will periodically check the users GPS location against a database to see if anything around has been tagged.

Example: John Doe walks through a park and comes upon a cool-looking tree. On his phone, in the app, he types “cool looking tree” and taps “Submit”. The text and his GPS location is transmitted to an online database. Now, when another user happens to be in the park they will get a pop-up saying “cool looking tree” with some visual indicators leading them to it.

Overview: The general best practices I have found are:

  • User enters data into mobile device
  • Data is transmitted to “middle man” (web server X)
  • Middle man transmits data to database X
  • Database saves the data, then returns “all is well” to the middle man
  • Middle man sends “all is well” to the mobile device
  • User gets “data saved” dialogue box on mobile device

Question: Would PostgreSQL (database) and a PHP web service (middle man) be the fastest solution here? If not, what database and middle man would you recommend for this process flow? My criteria for both is primarily speed. It’d be nice to be lightweight and easy to code against, but speed takes precedence. If the app needs to bypass the middle man and talk to the DB itself, I’m cool with that. This is not exactly banking data here.

Thank you for your time. :slight_smile:

Lastly, if the above is crap and you recommend a different methodology completely, please let me know that as well!

The easy solution is to use platform as a service like google app engine or amazon simple db. Are very easy to start, scale when you need, and pay what you use.

I recommend NodeJs and MongoDb, they are very easy to use, fast and will help you when you need to scale.

Php have problems to scale with multiples connections and any relational database have a lot of problems, expecially with many writes. Obvious, I am talking about many connections per second :stuck_out_tongue:

But it really depends of you need. Some other nices db:

  • Redis if for fast read, write, and opertaions with collections, but not big amount of data (some gb)
  • Cassandra if you will really scale like a crazy and can’t lose any write
  • Elastic search if you have very complex and text friendly search

In the end, use whatever you know that will be easy. Don’t bother yourself until your product get used and start to grow.

Here is a nice site about scalability http://highscalability.com/