Barriers in LMAX Disruptor
LMAX Disruptor is a high performance inter-thread messaging library for Java. When the first version appeared several years ago, it made a lot of buzz on the Internet thanks to the innovative approach to concurrency. This article focuses on event consumers and barriers in LMAX Disruptor. Barriers are an important part of Disruptor architecture. They […]
Efficient test startup: JUnit + Micronaut + Testcontainers
Some time ago I was wondering how to speed up the execution time of integration tests in my application. I was already using Micronaut framework which gave me a huge boost thanks to incredibly fast startup. But I struggled with Docker containers, started through Testcontainers library. In JUnit, they had to be restarted between test […]
Don’t be afraid of IF statements
For many years, Java language lacked reasonable support for functional programming. When lambdas appeared almost 8 years ago, it was a huge shift for everyone which paved the way to many of today’s main libraries and tools. However, soon after that I noticed a strange effect. Some developers were so impressed with new Java API-s […]
On keeping passwords in char arrays in Java
In the company I worked a couple of years ago, we were building an internal Java framework for creating configuration applications. One day we received a feature request to support storing passwords in character arrays instead of strings, motivated by security reasons. The reporters wanted to clear the memory in a controlled way instead of […]