I am in the nascent phases of developing a location based app, but have gotten stuck in trying to figure out a good way to store the data. Currently cassandra is the top contender.
I am in the nascent phases of developing a location based app, but have gotten stuck in trying to figure out a good way to store the data. Currently cassandra is the top contender.
class GeosayController < ApplicationController
def api
expires_in 1.minutes, :public => true
results = Tweet.near(params[:lat].to_f,params[:lon].to_f)
render :json => results
end
end....
class Tweet
include MongoMapper::Document
def self.near(lat, lon)
self.all( :latlong => {'$near' => [lat, lon]}, :limit => 30)
end
endBefore then we were looking at Postgres for its geo stuff and things like cassandra also.
Once we made the decision to use mongodb, it made sense to use the built in near functionality, rather than roll it ourselves.
I have used (and liked) mongodb in the past. Horizontal scalability is important and mongo doesn't have a stable release with sharding. Also, this page http://www.mongodb.org/display/DOCS/Sharding+Upgrading+from+... seems empty.
But, the ease of use is really tempting :)