Author: Karsten Silz
Mar 2, 2022   |  updated Mar 26, 2022 3 min read


Java Full-Stack Report March 2022: New & Noteworthy

This is an old version! Click below for the current one.

See Current Version

What’s This?

Here are the most important news for Java developers from last month - in my opinion, at least.


February 2022 January 2022

Table Of Contents

New & Noteworthy

February has been a light news month. That’ll change in March when Java 18 hits!

Groovy 4.0.0 Introduces Switch Expressions and Sealed Types

Groovy is the clear number four of JVM languages. That doesn’t keep it from evolving! Version 4.0 adds two features that Java got last year - switch expressions (Java 14) and sealed types (Java 17). Records (Java 16) are an incubator feature in Groovy. This page gives a good overview of new Java features.

Groovy 4.0 adds type checkers through annotations (such as checking regular expressions). And the incubating contracts module lets us specify conditions that are always true for a class (invariants), true before a method executes (pre-conditions), and true after a method executes (post-conditions). This also uses annotations.

Azul Launches External JIT Compiler

How do you set your OpenJDK distribution apart from the other ones? If you’re Azul, then the answer is “features”. Azul Prime, the commercial distribution, already has its own garbage collector and JIT compiler. And now we can run that JIT compiler - that usually is part of our applications - in a Kubernetes cluster as a separate process. The marketing term is “Cloud-Native Compiler”. What’s the benefit?

This “frees JVM processes from expensive compute and memory overheads at key times, like warm-up”, as the FAQ states. Because it has more resources, the Cloud-Native Compiler can also optimize better. And at least some of the JIT-compiled code could be shared among Java applications. Ok, so what’s the downside?

First, we need to pay for Azul Prime. And then we need to reserve quite some CPU power for the Cloud-Native Compiler: Azul recommends “10-20 vCores for each actively warming up JVM”. Holy moly!

Java Garbage Collection Deep Dive, Part 1

We all know that garbage collectors in Java make our life easier. But what garbage collectors are available today? But how can we tune them? And how benchmark?

These are the kind of questions a new article series wants to answer. The first article discusses all free Java garbage collectors, leaving out commercial collectors like the one in Azul Prime (see the previous section). It recommends a benchmarking strategy (realistic load test plus garbage collector logs). And then it concludes with some optimization tips.

I’m looking forward to reading future entries in this series!

Multiversion Concurrency Control in Postgres

To me, databases are one of the miracles in software development: Multiple application threads write to the database simultaneously - but they all can behave as if they’re the only ones doing so. How do databases pull this off?

Postgres, the number two database in my popularity check, uses Multiversion Concurrency Control. As the “Multi” suggests, Postgres “will not overwrite the original data item with new data, but instead creates a newer version of the data item.” Listen to this podcast episode if you want to know how exactly.

comments powered by Disqus