Dawid Kałuża

Blog

Database locking revisited

Jun 26, 2025
databaselockingpostgresjava

For me, it was hard to find a paper that would thoroughly explain to me how I can make database operations in my app thread-safe. Most of them focus on explaining @Transactional annotation and other framework mechanisms, but hardly ever elaborate on how it works in the database, or still believe that serializable transactions are executed sequentially (not true!). Here, I go into those details and explain on examples how you can leverage your database.

Read more

Thread pools in Java

Jun 21, 2025
javathreadsconcurrencythread pools

Concurrency is hard and deciding how to manage threads can be extremely challenging, or even undoable, if the code is a mess. Thankfully, Java shares a useful API to create different kinds of thread pools, to address various use cases. In this article, I describe the API and show, on examples, how you can take advantage of it.

Read more