Rails, threads and Facebook

Rails is not thread safe framework. That means Rails will process one request at a time. If there is more HTTP client requests they need to wait. Of course there are some ways to make whole app more responsive. Basically You need to increase Rails instances number and provide some load balancing. mongrel_cluster will do …

Interacting with Facebook without user

As a developer of applications based on Facebook Platform I was asking myself how to make changes in user profile not only when user is interacting with application directly. Users sessions are infinite First Eureka was to understand, that with Facebook Platform web application, every user session is infinite (does not expire) as long as …

Understanding what characters are escaped by AR

Working on Facebook application for my customer I’ve been reminded about some basic facts of strings escaping by ActiveRecord. I found a code which could be bug cause in some circumstances – when using find with :conditions => [ “some_field = ?”, attr]. This pattern makes attr string passed to database engine safe in context …