Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introductional blog post - base content #2273

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions _posts/2025-03-31-mmaler-blogpost-1-intro.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
---
layout: post
title: 'Optimizing Java for the Cloud-Native Era with Quarkus'
date: 2025-03-31
tags: introduction development performance
synopsis: This blog post invites you to discover how Quarkus can help your company cut costs, streamline development, and modernize your Java stack for today’s cloud-native world.
author: mmaler
thumbnailimage: /assets/images/posts/mmaler-blog-posts/optimizing-java-with-quarkus-cloud.png
---
:imagesdir: /assets/images/posts/mmaler-blog-posts/
ifdef::env-github,env-browser,env-vscode[:imagesdir: ../assets/images/posts/mmaler-blog-posts]

= Optimizing Java for the Cloud-Native Era with Quarkus

image::optimizing-java-with-quarkus-cloud.png[scaledwidth=100%]

== Intro

This post explores how Quarkus can help organizations reduce costs, streamline development, and modernize their Java applications for today’s cloud-native environments.
It outlines the real-world benefits of adopting Quarkus and highlights how its core features address the performance and scalability challenges commonly associated with traditional Java frameworks.

Quarkus is already being adopted across industries.
One example is Orange, a global telecom provider that selected Quarkus to support its 5G API initiative, and benefited from fast startup times, a lightweight footprint, and seamless integration with Kubernetes.

* After evaluating multiple frameworks, Orange chose Quarkus as the optimal solution for exposing 5G APIs, thanks to its fast startup, lightweight footprint, modularity, and seamless Kubernetes deployment.
Quarkus successfully deployed 10 APIs across 4G/5G network cores, with smooth upgrades and optimized resource usage.
This solidified Quarkus as a key technology for telecom innovation.
+
For a collection of user stories from the community, see the link:https://quarkus.io/userstories/[Quarkus user stories blog] series.
These stories highlight how different teams and organizations are using Quarkus in the real world.

== What does Quarkus have to offer?

=== Developer joy with live coding and dev mode

Quarkus streamlines the traditional write-compile-deploy-refresh cycle by offering live coding support out of the box. As developers make changes, Quarkus automatically detects, recompiles, and redeploys the application, which eliminates the need for manual restarts.

While similar functionality has existed through third-party tools, Quarkus integrates it natively and without licensing overhead. This significantly boosts productivity and enhances the developer experience.


=== Cost efficiency and performance

By optimizing for low memory usage and fast startup times, Quarkus enables higher-density deployments and rapid scaling.
For comparable workloads, Quarkus typically consumes fewer resources such as CPU and memory, which can lead to significant cost savings in cloud environments.
However, organizations considering the switch should always measure and evaluate their specific workloads to validate these benefits in practice.

=== Reactive at its core

At its core, Quarkus is built on Eclipse Vert.x, a high-performance reactive toolkit.
Still, it allows developers to work primarily in an imperative style while leveraging the performance benefits of its reactive underpinnings.
This hybrid approach allows developers to squeeze out even more efficiency from traditional imperative programming while offering the flexibility to adopt reactive patterns where they make sense.
Unlike traditional reactive-only frameworks, Quarkus enables developers to combine both imperative and reactive styles in a single application.
This is particularly beneficial for systems requiring high throughput and low latency, ensuring that applications remain robust under heavy load.
Quarkus's reactive model makes it ideal for event-driven architectures and microservices.

* A basic example of reactive messaging in Quarkus:
+
[source, java]
----
@ApplicationScoped
public class PriceConverter {

@Incoming("prices")
@Outgoing("converted-prices")
public double convert(double priceInEuro) {
return priceInEuro * 1.1;
}
}
----
+
In this example, prices are received from one channel (`prices`), converted, and sent to another channel (`converted-prices`).
This pattern supports high-throughput, event-driven processing with clean and efficient logic.

* An example of a reactive HTTP endpoint using reactive routes in Quarkus:
+
[source,java]
----
@ApplicationScoped
public class GreetingRoute {

@Route(path = "/hello", methods = HttpMethod.GET)
public Uni<String> hello() {
return Uni.createFrom().item("Hello from reactive route!");
}
}
----
+
This route handles HTTP GET requests reactively using `Uni` from Mutiny, making it easy to build non-blocking, low-latency APIs.

== Which of your current development pains could Quarkus solve?

One often-overlooked benefit of Quarkus is how it improves onboarding and standardization across teams.
With built-in conventions, automatic service provisioning, and curated extension defaults, Quarkus helps developers get up to speed quickly and encourages consistent patterns across projects.

=== Dev Services

Quarkus Dev Services reduce friction during development and testing by automatically provisioning required services such as databases, message brokers, or identity providers.
For example, if your application includes PostgreSQL, Kafka, or Keycloak extensions, Quarkus can spin up the necessary containers without any manual setup.
This allows you to focus on coding instead of configuring infrastructure, accelerating your local development workflow.

=== Vast extension ecosystem

Quarkus offers a rich extension ecosystem that simplifies integration with essential technologies such as databases, messaging systems, authentication providers, and cloud services.
In addition to official extensions, the Quarkiverse community provides a growing collection of open-source extensions maintained by contributors across the ecosystem.
This broadens the range of supported technologies and enables developers to benefit from shared solutions and community expertise.

Popular extensions include:
* `quarkus-hibernate-orm` and `quarkus-jdbc-postgresql` for seamless data persistence.
* `quarkus-smallrye-reactive-messaging` and `quarkus-kafka-client` for reactive messaging and Apache Kafka integration.
* `quarkus-oidc` for implementing OpenID Connect authentication and securing applications.
* `quarkus-micrometer` and `quarkus-opentelemetry` for observability, metrics, and tracing.
* `quarkus-container-image-docker` and `quarkus-kubernetes` for containerization and deployment to Kubernetes platforms.

These extensions are widely adopted because they reduce boilerplate, provide reliable default configurations out of the box, and follow cloud-native best practices—making it easy to plug Quarkus into real-world architectures.

== Even better Quarkus? Here’s what new tools are on the way

=== Panache 2: Simplifying data access

Hibernate ORM with Panache is a lightweight abstraction layer built on top of Hibernate ORM that simplifies data interactions and reduces boilerplate code.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool to mention this but without code or some examples this to me does not provide much value to a reader ? its a lot of positive words for sure; but what have the reader learned after reading this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can add a link to a video presentation, maybe.

With the introduction of Panache 2, Quarkus expands its capabilities by integrating Hibernate Data Repositories and Jakarta Data under a unified API.
This unified approach makes adopting, switching between, or combining different data access paradigms easier.
By leveraging Hibernate's robust capabilities, Panache 2 enables developers to write concise and expressive queries while maintaining full compatibility with standard JPA features.
This results in cleaner, more maintainable applications and an intuitive approach to database management.

Panache 2 also introduces several key enhancements:
Supports mixing stateless, managed, blocking, and reactive operations in a single API.
Allows for the definition of generic or specialized entities (stateless, managed, blocking, reactive) and enables them to switch to another mode of operation via an API.

* Unifies entity operations and repository operations by using nested interfaces.
* Solves the user experience issue of repository injection by obtaining repository instances via generated static methods on the metamodel.
* Supports type-unsafe repositories that are out of the box for every entity and every mode of operation (stateless, managed, blocking, reactive).
* Provides type-safe repositories in addition to, or mixed with, type-unsafe repositories.

These improvements make Panache 2 a powerful tool for developers looking for flexibility, efficiency, and ease of use when working with data in Quarkus.

Of course, there's more exciting stuff on the horizon, but this is a blog post, not release notes! ;)

== “OK, I would like to try it, but is it easy enough to migrate my workflow to Quarkus?”

Migrating to a new framework can feel daunting, even when it promises better performance, lower costs, and an improved developer experience.
It’s like being offered a better house in a better neighborhood, but hesitating because of the hassle of packing, moving, and settling in.

With Quarkus, the transition doesn’t have to be disruptive.
Thanks to its compatibility with standard Java APIs, support for Jakarta EE and Spring, and a wide range of extensions, many projects can adopt Quarkus incrementally without rewriting existing code.
Whether you're coming from a traditional Java EE application server, a Spring-based stack, or another framework such as Micronaut or Dropwizard, Quarkus provides familiar APIs, tooling, and migration guides to ease the transition.
The platform supports commonly used Jakarta specifications like JAX-RS, CDI, JPA, and Bean Validation out of the box.
For Spring users, the compatibility layer includes support for widely used annotations and components.
See the link:https://quarkus.io/guides/spring-di[Spring DI guide] to learn more.

Need assistance getting started?
You’re not alone.
The Quarkus team offers expert guidance throughout the migration journey, from initial architecture reviews to production readiness.
Whether you're evaluating the framework or planning a full transition, support is available to help ensure a smooth and successful adoption.

All it takes is a decision to move forward.
Your team deserves a faster, leaner, and cloud-native future.

== Concluding note

Quarkus is redefining Java development by combining modern features with the robustness of the Java ecosystem.
Its focus on developer productivity, performance, and seamless integration positions it as a formidable framework for building efficient, cloud-native applications.
Whether you're looking to optimize costs, enhance development speed, or adopt a reactive approach, Quarkus is a game-changer for Java developers.

The end.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.