When two people attempt to update the same record near the same time, one of the updates will likely be overwritten. You can solve this problem with optimistic locking.
There is a chance one user will unintentionally override someone else's changes if they update a record near the same time. One solution is to use optimistic locking. The updated_at column can also be used for this as shown.
(8 minutes)
The config.threadsafe! option will likely be enabled by default in Rails 4.0. Here you will learn what this option does, how it affects production, and some tips on thread safety.
(10 minutes)
There are many approaches to locking down an API. Here I start off with HTTP Basic authentication then move on to generating a unique token which can be passed through a URL parameter or HTTP header.
(7 minutes)
PostgreSQL can act as a worker queue which can replace the need for a separate process to manage the background jobs. Here you will learn how to do this with the queue_classic gem.
(8 minutes)
Here I describe each Rack middleware that is included in a Rails app which will give you a better understanding of what a request goes through behind the scenes before it hits your application.
(14 minutes)