In today’s distributed enterprise systems, it is not uncommon to see several actors interacting with the same resource at the same time. To prevent said actors from interfering with each other, and to ensure data consistency, we often reach for the optimistic locking mechanism that is usually provided by the Java Persistence API.
But, how does concurrency control impact your API?
In this presentation, which will be a live coding session, we will model and implement REST API, fully supporting an optimistic locking mechanism according to art. You will see what request and response headers you should use and what response code should be returned in different situations. We will also see how the Spring Framework supports this type of implementation and what you need to take care of on your own.
Bartłomiej Słota - Software engineer, consultant, mentor and trainer at Bottega IT Minds. Speaker, and blogger at bartslota.com. Gained experience working in numerous industries, including healthcare, telco, marketing, finance, and energy, for companies of sizes from tens to thousands of people. Passionate about OOP, Domain Driven Design, software craftsmanship, microservices and software architecture in general. An enthusiast of Event Storming workshops. In personal life - a husband and a father. Loves heavy metal music, guitar playing, angling, and trekking.