Optimistic Concurrency Control in HTTP Services
August 4, 2020 | Technical Blog
The Bestmile platform exposes several REST APIs that our partners and clients use to efficiently orchestrate their fleets of vehicles.
Some resources of our system can be modified by several clients. Consider the situation where two clients are working on the same resource, what happens if both clients attempt to update the resource at the same time?
Optimistic concurrency control is a solution for handling concurrent updates applied to the same resource without having to resort to a locking system.
Bestmile embraces the HTTP protocol to implement optimistic concurrency control for resources exposed on REST APIs. Our implementation guarantees that servers, clients, and documentation are consistent together. Furthermore, it provides a clean separation between low-level concerns related to the HTTP protocol, and high-level business concerns.