Author: Karsten Silz Jan 4, 2021 3 min read


Weekly Links: January 4, 2021

Web Links


Do Loom’s Claims Stack Up?

Project Loom wants to reinvent threads in Java. The Loom project leader even argues that most people don’t like the reactive programming model withs streams and are better served with Loom’s virtual threads. One of the Jetty authors investigates: Do Loom’s claims stack up?

No, they don’t. Yes, we can run a million Loom threads on our laptops — but only if they don’t have deep call stacks! Under more realistic circumstances, the author only manages to create as many Loom threads as conventional ones. And we pay the price for virtual threads: Higher memory usage and much longer garbage collections. In part 2, the author finds that thread pools hold up just fine against Loom.

Yes, writing blocking code is easier with Loom. But it’s not the game-changer (now) that Oracle promised. There’s still time for Loom to improve, given that it won’t launch before 2022 at the earliest.

Java Pub House 94: Oh, Put on Your Hat Dr. Watson, We Are Sleuthing This Heap Dump

This long-running Java podcast is now also on YouTube. And in this episode, it looks at Java heap dumps. We need heap dumps to find memory leaks in Java. So here you learn how to create and analyze such heap dumps. There’s an audio version as well. Go here to play it directly in your browser.


Spring Boot Best Practices for Microservices

Most of the best practices here apply to Spring Boot in general: Collect metrics, don’t forget about logging, and don’t be afraid of using circuit breakers. I especially liked how you can enable an /info endpoint that shows Git commit & build information.

Resilient Applications With Spring and Resilience4J

A resilient application withstands errors and faults. It achieves this with time limiters, bulkheads, circuit breakers, rate limiters, retries, and caches. Resilience4J provides these patterns in Java. Although we can use Resilience4J in any Java application, the article demonstrates it with Spring Boot. And you can see why: Decorating a method call with @Retry(name = "retryConfig", fallbackMethod = "fallback") is powerful, indeed!


What’s New in MicroProfile 4.0

MicroProfile is “Spring Boot with Java/Jakarta EE pars”. Two months ago, I wrote about why Eclipse MicroProfile missed its June 2020 release date: They had to follow Eclipse rules. So now they have a specification process, and a working group, and a steering committee. Yay! Best of all: They did manage to release 4.0 on December 23, 2020. Most APIs have changed. This article gives an overview of the changes in Config 2.0, Fault Tolerance 3.0, Health 3.0, and Metrics 3.0. And yes, another article without ids on the section headings

This month in "How to Build Java Applications Today":
Java had patch releases, we can now write command-line interfaces with Java, and this book will save IntelliJ users tons of time.

Read my newsletter

comments powered by Disqus