A lot of large scale web apps use something like Node or message queueing along with Rails in an event-oriented architecture. An API request comes in, routes through a queue somewhere to get committed to a data store and also put in a cache. Then a web request comes in, Rails grabs data from the cache and then renders it with all of the Rails goodness for html generation, restful routing, etc.