We used Ruby's fibers at MongoDB to unwind a recursive algorithm and execute it horizontally, without the stack overhead of recursion. "Hang on," you might be thinking. "I thought fibers were a concurrency primitive?" You're not wrong! In this presentation, we'll summarize the problem we encountered while working with recursive callbacks, and give an overview of fibers in Ruby. Then, we'll put the two together and show you exactly how we ended up using fibers to solve an issue that was completely unrelated to concurrency.
Get notified about new features and conference additions.