Avoiding Conflicts in Highly-Concurrent Applications - Alec Grieser, Apple
Channel: The Linux Foundation
Date: 20/12/2018

This is intended to be a somewhat quick how-to on how to build useful primitives using FoundationDB features to help avoid conflicts in highly-concurrent systems. In particular, thinking about minimizing contention and not running into correctness issues related to multiple workers going at once. This will be demonstrated by explaining the design of a few simple patterns that are often useful within larger applications. This could include implementing (or avoiding) an auto-incrementing primary key replacement, including the naïve approach, an approach using a max_index, and an approach using versionstamps. Another application might be a high-contention queue (like our high-contention queue layer), where applications must be able to both append to the end of a growing thing as well as allow for multiple readers to pop from the beginning. Another might be something like a semaphore where you might have multiple requests at once attempting to take or release locks and doing that in an efficient way might be important. (In principle, this could be shortened to one example to meet the 20 minute time limit.)