How to Build Java Applications Today: August 16, 2021
Tags: java, bpf
Published: 2021-08-16 21:21:21

---
canonical_url: https://bpfnl.substack.com/p/how-to-build-java-applications-today-528
---

## TL;DR
Will Project Loom kill reactive programming, more VS Code Java improvements, JDK Mission Control 8.1.0, Spring Data 2021.0.4 & 2020.0.12, Quarkus 2.1.2, Micronaut 2.5.12.

***

## README
This is **issue #49** of my weekly newsletter, “How To Build Java Applications Today”. I read all the Java newsletters, so **you** don’t have to! And it’s “Java news with a smile”.

If you like my newsletter, then [subscribe to it on Substack](https://bpfnl.substack.com)! Or read it on [dev.to](https://dev.to/ksilz/series/11995),  the [Java Cafe](https://thejavacafe.com/ksilz/series/1), or [Medium](https://ksilz.medium.com). Even better: Share it with people who may be interested.

***

## Quote of the Week
*Venture backed companies fail when they run out of money. Bootstrappers fail when they run out of motivation.*
[Rob Walling](https://twitter.com/robwalling/status/1397568680880443393), a [serial entrepreneur](https://en.wikipedia.org/wiki/Rob_Walling), has a point - but bootstrappers need money, too.

***

## Stand-Up
It’s still August, it’s still vacation time, and there’s still not much happening in Java land. So I hope my readers enjoy the sun and their vacation! And that’s almost an excuse for not reading newsletters like this, “almost” being the important word here! 😉

***

## Code Review
### Issue 48 from August 9, 2021
I wrote [last week](https://bpfnl.substack.com/p/how-to-build-java-applications-today-3b0) that Java climbed to #2 in the RedMonk Ranking. That is true. I also noted that Java is ahead of Python. That is false: Java and Python share the #2 spot.

***

## ADVERTISEMENT
### 22 YEARS OF FULL-STACK JAVA FOR HIRE NEXT JANUARY
I’m a full-stack Java developer with 22 years of experience, looking for a project in January 2022, in Milton Keynes, London, or remote. I’ll work as a contractor or fixed-term employee but don’t take permanent positions. 

Interested? Then check out my resume & work samples!

[CHECK OUT MY RESUME & WORK SAMPLES ](https://ksilz.com/)

***

## Bookmarks
### Java
#### Will Project Loom Kill Reactive Programming?
Oracle’s [Project Loom](https://wiki.openjdk.java.net/display/loom/Main) reinvents threads in Java. That’s why it competes with reactive programming in Java. Project lead Ron Pressler claimed last year, as a fact, that “[not many people like](https://youtu.be/EDVesJ-yJ6U?t=902)” reactive programming. Earlier this year, he was more mellowed, saying that Project Loom exists because debugging a reactive program is so much harder (see [issue #39](https://bpfnl.substack.com/p/how-to-build-java-applications-today-068), section “Why Do We Need Project Loom?”).

Well, now we’re back to fighting words: Brian Goetz, the architect for the Java language at Oracle, says that “[Project Loom will kill reactive programming](https://youtu.be/9si7gK94gLo?t=1163)”. Like Ron before, Brian argues that reactive programming scales nicely but is too difficult to program. And once Java threads and their simple usage scale nicely, too, we don’t need reactive programming anymore.

Here’s the part I don’t understand: With reactive streams, a [consumer receives multiple values over time from a producer](https://www.baeldung.com/reactor-core). And the consumer can tell the producer to slow down (“backpressure”). These seem like useful abstractions. Do they disappear with Project Loom? Or will they be a library on top of Project Loom?

Meanwhile, Ron Pressler gave an insight into why Project Loom [“just” reimplemented Java threads](https://youtu.be/EO9oMiL1fFo?t=2133): Java threads have the advantage over “async/await” that the runtime [can switch between threads everywhere in the code](https://youtu.be/EO9oMiL1fFo?t=921) except for a critical section (“synchronized”). And Oracle can do Project Loom because they [can change the internal JVM representation of a thread](https://youtu.be/EO9oMiL1fFo?t=1101). Finally, he described “structured concurrency” as a [future Loom feature](https://youtu.be/EO9oMiL1fFo?t=2651):
```
try (var execute =
  Executors.newVirtualThreadExecutor(factory)
           .withDeadline(Instant.now().plusSeconds(30))) {
    executor.submit(task1);
    executor.submit(task2);
}
```

So here we’re submitting two tasks in parallel, wait for both of them to finish, and cancel if we’re not finished within 30 seconds. Today, this requires additional libraries.

So, when can we try Project Loom? “Soon” is what both said. So that means a preview in Java 18 next March at the earliest, possibly only Java 19 in September 2022. Then it will take probably at least two releases to get finalized. My guess is 2023 for Project Loom in production. Now, most organizations only use the Java LTS releases, so they’ll get their hands on Project Loom in September 2024 with Java 23.

[Brian Goetz interview](https://youtu.be/9si7gK94gLo), [Ron Pressler presentation](https://youtu.be/EO9oMiL1fFo)

***

### Tools
#### More VS Code Java Improvements
Last month I wrote an [InfoQ article](https://www.infoq.com/news/2021/07/visual-studio-code-java-ide) about how Microsoft’s Visual Studio Code (VS Code) boosted its Java IDE capabilities. Well, Microsoft didn’t stop there: The July release of VS Code makes it easier to run, view and search tests in Java. And from the department of “Duh!”: Microsoft “realized that Maven dependency conflict can be tricky to handle”, so they improved the display of Maven conflict resolution.

But there’s more: The [roadmap for the rest of the year](https://devblogs.microsoft.com/java/java-on-visual-studio-code-update-june-2021/) includes a better edit/compile/debug cycle, support for Gradle, more Java versions and Spring for Remote Development(using a container or remote machine [as a development environment](https://code.visualstudio.com/docs/remote/remote-overview)), and support for Project Loom (see above).

So it seems VS Code could be a serious competitor for Eclipse and Netbeans early next year. I recently switched from JetBrains WebStorm to VS Code for website development and like VS Code. It certainly feels snappier than WebStorm to me. And unlike JetBrains IDEs, it can update most plugins without a complete restart - yay!

Another benefit of VS Code for us Java developers could be convenient support for other languages: Python, Rust, Go, … - all in one IDE. It’s probably more robust than what Eclipse currently offers. And with JetBrains, we’d have to run [multiple  IDEs](https://www.jetbrains.com/products/#type=ide) that - I think - don’t share plugins, configuration settings, or keyboard shortcuts by default.

[July update](https://foojay.io/today/vs-code-java-july-2021-update-new-testing-experience-maven-improvements-and-product-roadmap-progress-update/)

***

### Releases
#### JDK Mission Control 8.1.0
This tool visualizes Java Flight Recorder (JFR) data and therefore helps to profile Java in production (see [issue #43](https://bpfnl.substack.com/p/how-to-build-java-applications-today-b5c), section “Free Java Production Profiling To Whither Away?”). It now needs Java 11+ and Eclipse 2021-03 to run and reads in JFR data about 25% faster. It also recognizes the memory allocation JFR event from Java 16 (see [issue #25](https://bpfnl.substack.com/p/how-to-build-java-applications-today-b38), section “Profiling in Production?”) and has a new view for constant values in the JFR recording.

[Announcement](https://foojay.io/today/jdk-mission-control-8-1-0-released/)

***

#### Spring Data 2021.0.4 & 2020.0.12
Both these libraries require (?) the upcoming Spring Boot 2.4.10 and 2.5.4 releases. It’s business as usual: Bug fixes and dependency upgrades for the 15 (version 2021.0.4) / 16 (2020.0.12) sub-projects, all listed on the announcement page.

[Announcement](https://spring.io/blog/2021/08/12/spring-data-2021-0-4-and-2020-0-12-released)

***

#### Quarkus 2.1.2
Quarkus marches on with another bugfix release. The changelog has [35 entries](https://github.com/quarkusio/quarkus/releases/tag/2.1.2.Final).

[Announcement](https://quarkus.io/blog/quarkus-2-1-2-final-released/)

***

#### Micronaut 2.5.12
Quarkus isn’t the only Spring Boot challenger in town, though it probably is the fastest-releasing one: This minor release from [Micronaut](https://micronaut.io) has seven changes, mostly documentation updates.

[Changelog](https://github.com/micronaut-projects/micronaut-core/releases/tag/v2.5.12)

***

## About
Karsten Silz is the author of this newsletter. He is a full-stack web & mobile developer with 22 years of Java experience, author, speaker, and marathon runner. Karsten got a Master's degree in Computer Science at the Dresden University of Technology (Germany) in 1996.

Karsten has worked in Europe and the US. He co-founded a software start-up in the US in 2004. Karsten led product development for 13 years and left after the company was sold successfully. He co-founded the UK SaaS start-up "[Your Home in Good Hands](https://yourhomeingoodhands.co.uk/)" as CTO in 2020. Since 2019, Karsten also works as a contractor in the UK.

Karsten has [this newsletter](https://bpfnl.substack.com/), a [developer website](https://betterprojectsfaster.com/), and a [contractor site](https://ksilz.com/). He's on [LinkedIn](https://www.linkedin.com/in/ksilz/), [Twitter](https://twitter.com/karsilz), and [GitHub](https://github.com/ksilz). Karsten is also an [author at InfoQ](https://www.infoq.com/profile/Karsten-Silz).