Tag: concurrency

Ring Buffer – a Data Structure Behind Disruptor

Disruptor is a high-performance library for passing messages between threads, developed and open sourced some years ago by LMAX Exchange company. They created this piece of software to handle an enormous traffic (more than 6 million TPS) in their retail financial trading platform. In 2010 they surprised everyone how fast their system can be by…

A Tale of Two Iterators

When you look at the most popular Java interview questions, you might encounter the one about fail-fast and fail-safe iterators: What’s the difference between fail-fast and fail-safe iterators? The simplified answer is that: Fail-fast iterator throws ConcurrentModificationException if the collection is modified while iterating, but fail-safe doesn’t. Even though it totally makes sense, it’s not…