Skip to content

Emery's Insights

Good Coding Practices, Software Design, and the Software industry.

Archive

Tag: Optimistic Locking

conflict_warnings is a Ruby on Rails plugin I wrote that addresses the shortcomings of optimistic locking when dealing with user actions that span multiple HTTP requests.

Rails provides optimistic locking as a method of ensuring that multiple changes to the same record at approximately the time do not clobber each other. The method that Rails sever uses to handle requests, renders optimistic locking useless in situations where it’s most needed.