eleftheria drosopoulou

4 posts

The Future of Async in Java: CompletableFuture vs Virtual Threads

Asynchronous programming is a cornerstone of modern Java applications, allowing them to handle tasks without blocking the main thread. But with Java 21 comes a new challenger: virtual threads. These lightweight alternatives to traditional OS threads promise significant performance improvements. However, the familiar CompletableFuture remains a powerful tool for asynchronous operations. This article dives into …
Read More

Mastering Asynchronous Operations with Callbacks

Ever wonder how websites can fetch data without freezing everything? That’s the magic of asynchronous operations! Callbacks are a classic way to handle these behind-the-scenes tasks. Imagine you tell a friend (the function) to get something (data). You (the main program) can keep doing things while your friend shops (the operation runs). Once they’re back …
Read More

@Transactional in Spring: Don’t Get Caught in These Traps

Transactions are a fundamental concept in database management, ensuring data consistency across multiple database operations. Spring provides the @Transactional annotation to simplify transaction management within your application. But wielding this power effectively requires understanding its nuances. Just like any powerful tool, misuse of @Transactional can lead to unexpected behavior and data integrity issues. This article …
Read More