30 May '13, 5pm

Thanks to ActiveModel::Serializers' cached flag, it's easy to make JSON APIs *really* fast /cc @j…

May 30, 2013 jdclayton performance ruby on rails Fast JSON APIs in Rails with Key-Based Caches and ActiveModel::Serializers Want to make your Rails JSON APIs fast? Blisteringly fast? In a project I’ve been working on recently, I reduced requests from 5 seconds (or more!) to at most 0.5 seconds by using ActiveModel::Serializers and partial object caching with object composition. Before I explain how, I’ll need to explain why . Partial Cacheability Imagine a Rails app that stores a handful of locations in a database: class Location < ActiveRecord::Base has_many :images has_many :categories geocoded_by :address after_validation :geocode end In this example, the Location model is using the geocoder gem to automatically geocode the model’s address. To find all locations within 15 miles of Boston: Location.near('Boston', 15) This returns an ActiveRecord::Relation with each locat...

Full article: http://robots.thoughtbot.com/post/50091183897/fast-json-a...

Tweets

28 APIs for Data-Driven Marketers. via @SEOmoz ...

seomoz.org 26 May '13, 10pm

I'll be honest, I had no idea that Google Webmaster Tools had an API. Do you have experience pulling from it? Any luck wit...

#freelance jobs: Ruby on Rails - Heroku - JSON ...

freelancer.com 09 Jun '13, 11pm

Project Description: Project involves existing open source script. Mainly front-end development cloning some additional fu...