Cloud Native Diary #5

This week, I talk about the future of Java, new features in Spring Boot 3, ARM64 support in Buildpacks, cloud native platforms, and more. Let's get to it.

Landscape photo of mountain scenery in East Java, Indonesia.

In Cloud Native Diary, I weekly share my journey working with application development, platform engineering, and cloud native technologies.

This week, I talk about the future of Java, new features in Spring Boot 3, ARM64 support in Buildpacks, cloud native platforms, and more. Let's get to it.

The Future of Java

After all this time, it still puzzles me to bump into posts or articles claiming that "Java is dead". It puzzles me because it's never been true. Especially this past few years, Java has never been more alive! The language and ecosystem evolved so much, and more is coming in future versions of Java. I can't wait!

This week, Nikolai Parlog published an article highlighting what will probably happen in 2023 in the Java world. Project Loom (introducing virtual threads) has been quite popular during 2022, but let's not forget about the exciting work being done in other areas, such as Project Leyden (improving startup time, peak performance, and memory footprint) and Project Lilliput (reducing the overall CPU and memory usage), just to name a few projects that are very relevant for cloud native applications.

Project Loom is already available as a preview feature in Java 19. With Spring Framework 6, you can start experimenting with virtual threads and evaluate their impact on your applications. If you'd like to try that, you can refer to the article by Mark Paluch on the Spring blog.

Spring, Cloud Native and Observability

This week, my book "Cloud Native Spring in Action" was released in ePUB and Kindle formats and also published on the O'Reilly Learning Platform.

If you read the book, feel free to leave a review on Amazon, Manning, or O'Reilly. And once again, I'd like to thank the readers and everyone who shared feedback about the book. I really appreciate that!

All the source code used in my book is available on GitHub. In the main branch, you'll find the source code as it's used in the book. Besides that, I also maintain a branch that I keep up-to-date with the latest Spring Boot releases (3.0.2 at the moment).

After an interesting conversation on Twitter, I have updated my "Spring Cloud Gateway: Resilience, Security, and Observability" GitHub repository to the latest versions of Spring Boot, Spring Cloud, and the Grafana stack. Among the other things, this repository demonstrates the new observability capabilities in Spring Framework 6 and Spring Boot 3 based on Micrometer and Micrometer Tracing.

I've been working on a more comprehensive example regarding observability in Spring, and I've been defining a collection of Grafana dashboards to help visualize telemetry data from different Spring projects. Stay tuned for updates!

One of the main features of Spring Boot 3 is support for generating native images with GraalVM, which is now part of the core framework, making it straightforward to build efficient applications with instant startup time and reduced memory consumption. That unlocks new possibilities, such as building Kubernetes controllers with Spring. This week, Tiffany Jernigan wrote an article to explain how to do that based on the official Kubernetes Java client, which now comes with an integration for GraalVM-powered Spring Boot applications.

Buildpacks, Paketo and ARM64

Support for ARM64 architectures has been a popular request in the Cloud Native Buildpacks community. It's the most voted feature suggested for the 2023 roadmap of the Paketo Buildpacks project, and I'm really looking forward to it!

Some work toward that direction has already been done in the past couple of years, so it looks like we could get ARM64 support later this year. Daniel Mikusa provided a repository with instructions and scripts to build an ARM64 version of the Paketo Buildpacks. Dashaun Carter expanded the example to achieve multi-architecture support, automated the build process, and published convenient builder images that can be used until official support is added to Paketo.

This week, I've been looking more closely at the underlying implementation to learn more about this topic. I successfully managed to build my ARM64 builder images. My next steps will be to obtain multi-architecture images (I'm having some issues with cross-registry manifests) and evaluate Oracle Cloud and BuildJet for running an automated build workflow via GitHub Actions (I'm currently running the builds on my Apple Silicon computer).

When using the pack CLI, you can test my builder image this way.

pack build <app-name> \
  --builder ghcr.io/thomasvitale/builder-arm:tiny \
  --trust-builder

If you work with Spring Boot, you can configure the Buildpacks integration in your build.gradle file to use my builder image on ARM64 architectures while keeping the official Paketo builder as the default.

tasks.named('bootBuildImage') {
  if (System.getProperty("os.arch").toLowerCase().startsWith('aarch')) {
    builder = "ghcr.io/thomasvitale/builder-arm:tiny"
  }
  builder = "paketobuildpacks/builder:tiny"
}

CNCF Platforms WG

The work we've been doing in the CNCF Platforms Working Group is moving fast. The goal is to publish a whitepaper on cloud native platforms, what problems they solve, how to implement them, and which organizational structures and processes are necessary to succeed in building one.

All the sections of the whitepaper are now on GitHub and currently going through one last round of discussions and updates that will end on February 28th. Then, the final draft will go through a formal review and be ready to be published right before KubeCon+CloudNativeCon Europe 2023.

I enjoy the conversations with the group so much. They're always insightful and engaging. I'm learning a lot, and I'm glad to contribute.

If you're interested in contributing to this work, you can join the #wg-platforms channel in the CNCF Slack.

Carvel

During KubeCon+CloudNativeCon North America 2022, VMware Tanzu announced that Carvel was accepted as a CNCF Sandbox project. The process is almost complete. This week, all repositories part of the Carvel project have been moved to a vendor-neutral organization on GitHub. You can now find all Carvel-related repositories at github.com/carvel-dev.

Cover picture from Pexels.