Posts Tagged ‘Quarkus’
[DevoxxBE2025] Quarkus Unleashed: Harnessing Extensions for Optimized Java Applications
Lecturer
Roberto Cortez contributes as a developer within the Quarkus group at Red Hat, concentrating on Java runtime enhancements for containerized settings. His background includes advancing from application user to primary maintainer, with a focus on compilation efficiencies and indigenous executables. Roberto regularly disseminates knowledge on streamlined Java deployments through various forums.
Abstract
This exposition scrutinizes the inner workings of Quarkus, a framework engineered for Kubernetes compatibility, which relocates conventional execution-phase tasks to assembly stages to curtail asset consumption. It dissects the pivotal function of add-ons in amalgamating external modules, facilitating attributes such as instantaneous updates, automated provisions, and GraalVM-based indigenous builds. Via empirical illustrations and programmatic excerpts, the narrative assesses strategies for add-on construction, their effects on efficacy, and wider ramifications for distributed infrastructures.
Historical Context and Paradigm Shift in Java Frameworks
Conventional Java environments, exemplified by Spring or WildFly, traditionally postpone substantial initialization to operational phases. Developers assemble classes into archives like JARs or WARs via builders such as Maven or Gradle, subsequently delegating to the environment for dissection, annotation examination, and resource instantiation. This engenders elevated memory demands from broad class importation and introspection, coupled with protracted activation intervals—frequently surpassing ten seconds prior to substantive operations.
Quarkus subverts this convention by transposing maximal computations to the construction epoch. Leveraging assembly instruments, it scrutinizes the holistic application milieu during compilation, executing refinements typically deferred. For example, setup documents like application.properties undergo parsing at build, obviating recurrent operational burdens. This “sealed-universe” presumption—wherein the complete scope is predefined—permits obsolete code excision, diminishing imported classes and memory footprint.
The advantages are manifold: calculations transpire singularly at assembly, not iteratively per instance; superfluous setup classes are discarded; and initiation hastens markedly. In nebulous ecosystems, where expenditures align with utilization, these economies yield fiscal merits. Additionally, by attenuating dependence on fluid attributes like introspection and surrogates, Quarkus bolsters foreseeability and security, transmuting prospective operational anomalies into assembly-era alerts.
This reconfiguration resonates with contemporary requisites for encapsulated, expandable solutions. Quarkus not only accommodates JVM execution but thrives in indigenous compilation through GraalVM, where constraints—like unsupported fluid class importation—demand preemptive resolutions. Add-ons surface as the cardinal instrument herein, encapsulating module-specific rationale to assure congruence sans altering the module proper.
Architectural Design of Extensions and Build Mechanisms
Quarkus add-ons compartmentalize capabilities, segregating fundamental execution from module assimilations. Each add-on encompasses dual components: deployment (assembly-era) and execution (operational-era). The deployment component exploits build phases and build artifacts—loosely interlinked notions akin to Maven stages and outputs. Build phases ingest and yield build artifacts, forging a sequence that composes the solution.
Build artifacts may be unitary (yielded once) or plural (yielded multiply), affording granular oversight. For illustration, a LaunchModeBuildItem denotes development, evaluation, or production modes, swaying ensuing phases. Add-ons interact through communal build artifacts; one might ingest REST terminus particulars from another for bespoke handling.
Jandex, an indexing utility, surveys the class route for annotations, derivations, or realizations, enabling metadata-guided determinations. Bytecode capturers seize assembly-era entities for operational reconstitution, circumventing instantiation expenses. Contemplate a module with a protracted constructor:
public class Warrior {
public Warrior() {
System.out.println("Preparing...");
Thread.sleep(10000); // Emulated latency
System.out.println("Preparation done!");
}
public String strike() { return "Energy blast!"; }
}
Within the add-on’s handler:
@BuildStep
void captureWarrior(RecorderContext recorderContext) {
Warrior warrior = new Warrior();
recorderContext.capture(warrior);
}
Quarkus fabricates bytecode to regenerate the entity operationally, sidestepping the latency.
For indigenous congruence, add-ons enroll introspection metadata or furnish replacements. GraalVM’s sealed-universe precludes fluid attributes unless overtly configured, thus add-ons manage this unobtrusively.
Empirical Assimilation: Scenarios and Refinements
To exemplify, ponder amalgamating DataFaker, a mock data generator. It functions in JVM mode yet falters indigenously owing to static initializers invoking stochastic services during assembly. An add-on rectifies this:
-
Unearth suppliers via Jandex:
index.getAllKnownSubclasses(AbstractProvider.class). -
Enroll instantaneous reload monitors:
HotDeploymentWatchedFileBuildItemfor YAML setups. -
Capture Faker entities: Employing non-standard constructors or replacements for serialization.
-
Indigenous rectifications: ReflectiveClassBuildItem for constructors; replacements to postpone stochastic initialization.
Programmatic fragment for supplier unearthing:
@BuildStep
MultiBuildItem unearthSuppliers(IndexView index) {
Collection<ClassInfo> suppliers = index.getAllKnownSubclasses(AbstractProvider.class.dotName());
for (ClassInfo supplier : suppliers) {
// Handle YAML, monitor reload, yield DataFakerProviderBuildItem
}
}
This enables infusion:
@Inject
@AnimeCharacters // Bespoke qualifier
Faker faker;
Replacements supersede problematic static segments:
@TargetClass(StochasticService.class)
final class StochasticServiceReplacement {
@Alias
static StochasticService INSTANCE;
@Substitute
public static StochasticService employDirect() {
// Postpone to operation
return new StochasticService(new Stochastic());
}
}
Such amalgamations not only resolve congruence but augment usability, like auto-reinvigorating bespoke suppliers.
Add-ons also unlock Quarkus traits: Dev Services instantiate vessels predicated on discerned dependencies; perpetual testing reexecutes impacted evaluations; unified setup rationalizes arrangements.
Wider Ramifications for Creation and Deployment
By embedding module rationale in add-ons, Quarkus cultivates a dynamic milieu—myriad accessible via code.quarkus.io, spanning Red Hat-endorsed to communal inputs. Creators can fabricate bespoke add-ons for proprietary modules, assuring comprehensive Quarkus merits sans bifurcating originals.
Efficacy gains are considerable: diminished memory and swifter initiations suit serverless and Kubernetes milieus, curtailing expansion latencies. Indigenous images, transmuting to executables, amplify this for peripheral computation or constrained apparatuses.
Hurdles encompass cognitive reorientations—imaginatively discerning assembly-era prospects—and module erudition for precise amalgamations. Yet, the framework’s adaptability, with elective traits like bytecode fabrication, accommodates diverse intricacy.
In recapitulation, Quarkus add-ons epitomize a refined progression in Java environments, accentuating proficiency and creator encounter. They authorize designers to erect durable, refined solutions, synchronizing with nebulous-native doctrines and establishing a criterion for prospective runtimes.
Links:
- Lecture video: https://www.youtube.com/watch?v=zVEcqrHQXwI
- Roberto Cortez on LinkedIn: https://www.linkedin.com/in/rcortez777/
- Roberto Cortez on Twitter/X: https://twitter.com/rcortez777
- Red Hat website: https://www.redhat.com/
[VoxxedDaysTicino2026] Agentic AI Patterns
Lecturer
Kevin Dubois is a Senior Principal Developer Advocate at IBM, previously with Red Hat, focusing on Java, AI, and cloud-native development. As a Java Champion and Technical Lead for the CNCF Developer Experience Technical Advisory Group, Kevin authors content, speaks internationally, and contributes to open-source projects. Mario Fusco, co-presenter, is a Senior Principal Software Engineer at IBM (Red Hat), leading the Drools project. A Java Champion with expertise in functional programming and domain-specific languages, Mario coordinates the Milano Java User Group and frequently speaks on software engineering topics. Relevant links include Kevin’s LinkedIn profile (https://ch.linkedin.com/in/kevindubois), Mario’s LinkedIn profile (https://it.linkedin.com/in/mario-fusco-3467213), and Mario’s X account (https://x.com/mariofusco).
Abstract
This article investigates patterns in agentic AI systems as presented by Kevin Dubois and Mario Fusco, emphasizing orchestration of AI services for complex tasks. It delineates foundational components, workflow-based orchestration, autonomous agent models, and extensible planners. Through analysis of methodologies in LangChain4j with Quarkus, it elucidates contexts, implementations, and ramifications for building sophisticated AI applications.
Foundations of AI Services and Agentic Systems
Kevin and Mario initiate their discourse by establishing core elements of AI-infused applications, particularly within Java ecosystems using LangChain4j and Quarkus. An AI service fundamentally interfaces with a large language model (LLM) to process inputs and yield responses. However, effective integration demands more: precise prompting to elicit desired outputs, memory management to sustain conversational context, tool invocation for external actions, and data augmentation via retrieval-augmented generation (RAG).
Prompting emerges as pivotal; vague instructions yield suboptimal results, whereas structured prompts enhance accuracy. Memory, absent in standalone LLMs, requires client-side tracking—LangChain4j automates this, customizable via caching. Tools enable LLMs to perform actions like database queries or email dispatch, via function calling where LLMs request tool usage.
RAG integrates proprietary data: embeddings store vectorized information in databases like Pinecone, retrieved to enrich prompts. Moderation filters harmful content, ensuring ethical outputs.
Agentic systems extend this: agents, autonomous entities with goals, leverage these components. Patterns categorize into workflows (predefined paths) and autonomous agents (dynamic LLM-directed processes). Contexts include scenarios needing multi-step reasoning, like trip planning involving weather, flights, and accommodations.
Implications: These foundations enable modular, scalable AI, but demand careful design to mitigate errors like hallucinations.
Code illustrates basics:
@RegisterAiService
interface WeatherAgent {
String getWeather(String city);
}
This defines an AI service interfacing with an LLM for weather queries.
Workflow-Based Orchestration of Agents
Workflow patterns orchestrate agents through coded sequences, suitable for predictable tasks. Kevin and Mario detail sequential, parallel, conditional, and looping workflows in LangChain4j.
Sequential invokes agents in order: e.g., weather retrieval followed by outfit suggestion. Parallel executes concurrently, aggregating outputs—useful for independent subtasks like multi-city weather checks.
Conditional branches based on outputs: if weather is rainy, suggest indoor activities. Looping iterates until conditions met, like refining content via reviewer-critic cycles.
Methodology employs builders:
AgenticSystem system = AgenticSystem.builder()
.sequence(weatherAgent, outfitAgent)
.build();
Execution yields structured results, with event logs for monitoring.
Contexts: Workflows suit deterministic processes, reducing LLM variability. Implications: Enhance efficiency but limit adaptability; error handling via retries or prompt adjustments is crucial.
Autonomous and Dynamic Agent Orchestration
Autonomous patterns empower an LLM-orchestrator to dynamically select agents, ideal for unstructured tasks. The orchestrator evaluates inputs, plans invocations, and executes, adapting via reasoning.
Mario explains: Orchestrator prompts guide tool (agent) selection. Execution involves planning, tool calls, and result integration until resolution.
AgenticSystem system = AgenticSystem.builder()
.autonomous(orchestrator)
.agents(agent1, agent2)
.build();
Contexts: Handles ambiguity, like open-ended queries. Implications: Increases flexibility but risks infinite loops or off-track reasoning; human-in-the-loop mitigates via approvals.
Multimodal extensions process PDFs or generate images, expanding applicability.
Extensible Planners for Custom Agentic Patterns
To accommodate diverse needs, Mario introduces pluggable planners, abstracting orchestration. This service provider interface (SPI) allows custom implementations, like goal-oriented patterns using A* search.
Planners initialize with agents, determining next actions: invoke agents (sequentially/parallel) or conclude. Existing patterns refactor atop this.
Goal-oriented example: Define prerequisites and goals; algorithm generates invocation graphs.
Planner customPlanner = new GoalOrientedPlanner(agents);
AgenticSystem system = AgenticSystem.builder()
.planner(() -> customPlanner)
.build();
Hybridization combines patterns, e.g., goal-oriented with loops for refinement.
Contexts: Custom scenarios like adaptive learning systems. Implications: Fosters innovation, but requires algorithmic expertise; promotes modularity in AI design.
In summary, Kevin and Mario’s patterns advance agentic AI, blending structure with dynamism for robust applications.
Links:
[KotlinConf2025] LangChain4j with Quarkus
In a collaboration between Red Hat and Twilio, Max Rydahl Andersen and Konstantin Pavlov presented an illuminating session on the powerful combination of LangChain4j and Quarkus for building AI-driven applications with Kotlin. The talk addressed the burgeoning demand for integrating artificial intelligence into modern software and the common difficulties developers encounter, such as complex setups and performance bottlenecks. By merging Kotlin’s expressive power, Quarkus’s rapid runtime, and LangChain4j’s AI capabilities, the presenters demonstrated a streamlined and effective solution for creating cutting-edge applications.
A Synergistic Approach to AI Integration
The core of the session focused on the seamless synergy between the three technologies. Andersen and Pavlov detailed how Kotlin’s idiomatic features simplify the development of AI workflows. They presented a compelling case for using LangChain4j, a versatile framework for building language model-based applications, within the Quarkus ecosystem. Quarkus, with its fast startup times and low memory footprint, proved to be an ideal runtime for these resource-intensive applications. The presenters walked through practical code samples, illustrating how to set up the environment, manage dependencies, and orchestrate AI tools efficiently. They emphasized that this integrated approach significantly reduces the friction typically associated with AI development, allowing engineers to focus on business logic rather than infrastructural challenges.
Enhancing Performance and Productivity
The talk also addressed the critical aspect of performance. The presenters demonstrated how the combination of LangChain4j and Quarkus enables the creation of high-performing, AI-powered applications. They discussed the importance of leveraging Quarkus’s native compilation capabilities, which can lead to dramatic improvements in startup time and resource utilization. Additionally, they touched on the ongoing work to optimize the Kotlin compiler’s interaction with the Quarkus build system. Andersen noted that while the current process is efficient, there are continuous efforts to further reduce build times and enhance developer productivity. This commitment to performance underscores the value of this tech stack for developers who need to build scalable and responsive AI solutions.
The Path Forward
Looking ahead, Andersen and Pavlov outlined the future roadmap for LangChain4j and its integration with Quarkus. They highlighted upcoming features, such as the native asynchronous API, which will provide enhanced support for Kotlin coroutines. While acknowledging the importance of coroutines for certain use cases, they also reminded the audience that traditional blocking and virtual threads remain perfectly viable and often preferred for a majority of applications. They also extended an open invitation to the community to contribute to the project, emphasizing that the development of these tools is a collaborative effort. The session concluded with a powerful message: this technology stack is not just about building applications; it’s about empowering developers to confidently tackle the next generation of AI-driven projects.
Links:
[DevoxxGR2025] Unmasking Benchmarking Fallacies
Georgios Andrianakis, a Quarkus engineer at Red Hat, presented a 46-minute talk at Devoxx Greece 2025, dissecting benchmarking fallacies, based on a talk by performance expert Francisco Negro.
The Benchmarketing Problem
Andrianakis introduced “benchmarketing,” where benchmarks are manipulated for marketing. Inspired by Negro’s frustration with a claim that Helidon outperformed Quarkus in a TechEmpower benchmark, he explored how data can be misrepresented. Benchmarks should be relevant, representative, equitable, repeatable, cost-effective, scalable, and transparent. A misleading article claimed Helidon’s superiority, but Negro’s investigation revealed unfair comparisons, sparking this talk to expose such fallacies.
Dissecting a Flawed Claim
Focusing on equity, Negro analyzed the TechEmpower benchmark, which tests web frameworks on tasks like JSON serialization and database queries. The claim hinged on a test where Helidon used a raw database driver (Vert.x for PostgreSQL), while Quarkus used a full object-relational mapper (ORM) like Hibernate, incurring performance penalties. Filtering for full ORM tests, Quarkus topped the charts, with Helidon absent. Comparing both without ORMs, Quarkus still outperformed. This exposed the claim’s inequity, as it wasn’t apples-to-apples, misleading readers.
Critical Thinking in Benchmarks
Andrianakis emphasized skepticism, citing Hitchens’ Razor: claims without evidence can be dismissed. Using Brendan Gregg’s USE method, Negro identified CPU saturation, not database I/O, as the bottleneck, debunking assumptions. He urged active benchmarking—monitoring errors and resources—and measuring one level deeper to understand performance. Awareness of biases, like confirmation bias, and avoiding assumptions of malice over incompetence, ensures fair evaluation of benchmark claims.
Links
[DevoxxUK2024] Productivity is Messing Around and Having Fun by Trisha Gee & Holly Cummins
In their DevoxxUK2024 talk, Trisha Gee (Gradle) and Holly Cummins (Red Hat, Quarkus) explore developer productivity through the lens of joy and play, challenging conventional metrics like lines of code. They argue that developer satisfaction drives business success, drawing on Fred Brooks’ The Mythical Man-Month to highlight why programmers enjoy crafting, solving puzzles, and learning. However, they note that developers spend only ~32% of their time coding, with the rest consumed by toil (e.g., waiting for builds, context-switching).
The speakers critique metrics like lines of code, citing examples where incentivizing code volume led to bloated, unmaintainable codebases (e.g., ASCII art comments). They warn against AI tools like Copilot generating verbose, unnecessary code (e.g., redundant getters/setters in Quarkus), which increases technical debt. Instead, they advocate for frameworks like Quarkus that reduce boilerplate through build-time bytecode inspection, enabling concise, expressive code.
Trisha and Holly introduce the SPACE framework (Satisfaction, Performance, Activity, Communication, Efficiency) as a holistic approach to measuring productivity, emphasizing developer well-being and flow over raw output. They highlight the importance of mental space for creativity, citing the brain’s default mode network, activated during low-stimulation activities like showering, running, or knitting. They encourage embracing “boredom” and play, supported by research showing happier developers are more productive. The talk critiques flawed metrics (e.g., McKinsey’s) and warns against management misconceptions, like assuming developers are replaceable by AI.
[DevoxxBE 2023] The Great Divergence: Bridging the Gap Between Industry and University Java
At Devoxx Belgium 2023, Felipe Yanaga, a teaching assistant at the University of North Carolina at Chapel Hill and a Robertson Scholar, delivered a compelling presentation addressing the growing disconnect between the vibrant use of Java in industry and its outdated perception in academia. As a student with internships at Amazon and Google, and a fellow at UNC’s Computer Science Experience Lab, Felipe draws on his unique perspective to highlight how universities lag in teaching modern Java practices. His talk explores the reasons behind this divergence, the negative perceptions students hold about Java, and actionable steps to revitalize its presence in academic settings.
Java’s Strength in Industry
Felipe begins by emphasizing Java’s enduring relevance in the professional world. Far from the “Java is dead” narrative that periodically surfaces online, the language thrives in industry, powered by innovations like Quarkus, GraalVM, and a rapid six-month release cycle. Companies sponsoring Devoxx, such as Red Hat and Oracle, exemplify Java’s robust ecosystem, leveraging frameworks and tools that enhance developer productivity. For instance, Felipe references the keynote by Brian Goetz, which outlined Java’s roadmap, showcasing its adaptability to modern development needs by drawing inspiration from other languages. This continuous evolution ensures Java remains a cornerstone for enterprise applications, from microservices to large-scale systems.
However, Felipe points out a troubling trend: despite its industry strength, Java’s popularity is declining in metrics like GitHub’s language rankings and the TIOBE Index. While JavaScript and Python have surged, Java’s share of relevant Google searches has dropped from 26% in 2002 to under 10% by 2023. Felipe attributes this partly to a shift in academic settings, where the foundation for programming passion is often laid. The disconnect between industry innovation and university curricula is a critical issue that needs addressing to sustain Java’s future.
The Academic Lag: Java’s Outdated Image
In universities, Java’s reputation suffers from outdated teaching practices. Felipe notes that many institutions, including top U.S. universities, have shifted introductory courses from Java to Python, citing Java’s perceived complexity and age. A 2017 quote from a Stanford professor illustrates this sentiment, claiming Java “shows its age” and prompting a move to Python for introductory courses. Surveys of 70 leading U.S. universities confirm this trend, with Python now dominating as the primary teaching language, while Java is relegated to data structures or object-oriented programming courses.
Felipe’s own experience at UNC-Chapel Hill reflects this shift. A decade ago, Java dominated the curriculum, but by 2023, Python had overtaken introductory and database courses. This transition reinforces a perception among students that Java is verbose, bloated, and outdated. Felipe conducted a survey among 181 students in a software engineering course, revealing stark insights: 42% believed Python was in highest industry demand, 67% preferred Python for building REST APIs, and terms like “tedious,” “boring,” and “outdated” dominated a word cloud describing Java. One student even remarked that Java is suitable only for maintaining legacy code, a sentiment that underscores the stigma Felipe aims to dismantle.
The On-Ramp Challenge: Simplifying Java’s Introduction
A significant barrier to Java’s adoption in academia is its steep learning curve for beginners. Felipe contrasts Python’s straightforward “hello world” with Java’s intimidating boilerplate code, such as public static void main. This complexity overwhelms novices, who grapple with concepts like classes and static methods without clear explanations. Instructors often dismiss these as “magic,” which disengages students and fosters a negative perception. Felipe highlights Java’s JEP 445, which introduces unnamed classes and instance main methods to reduce boilerplate, as a promising step to make Java more accessible. By simplifying the initial experience, such innovations could align Java’s on-ramp with Python’s ease, engaging students early and encouraging exploration.
Beyond the language itself, the Java ecosystem poses additional challenges. Installing Java is daunting for beginners, with multiple Oracle websites offering conflicting instructions. Felipe recounts his own struggle as a student, only navigating this thanks to his father’s guidance. Tools like SDKMan and JBang simplify installation and scripting, but these are often unknown to students outside the Java community. Similarly, choosing an IDE—IntelliJ, Eclipse, or VS Code—adds another layer of complexity. Felipe advocates for clear, standardized guidance, such as recommending SDKMan and IntelliJ, to streamline the learning process and make Java’s ecosystem more approachable.
Bridging the Divide: Community and Mentorship
To reverse the declining trend in academia, Felipe proposes actionable steps centered on community engagement. He emphasizes the need for industry professionals to connect with universities, citing examples like Tom from Info Support, who collaborates with local schools to demonstrate Java’s real-world applications. By mentoring students and updating professors on modern tools like Maven, Gradle, and Quarkus, industry can reshape Java’s image. Felipe also encourages inviting students to Java User Groups (JUGs), where they can interact with professionals and discover tools that enhance Java development. These initiatives, he argues, plant seeds of enthusiasm that students will share with peers, amplifying Java’s appeal.
Felipe stresses that small actions, like a 10-minute conversation with a student, can make a significant impact. By demystifying stereotypes—such as Java being slow or bloated—and showcasing frameworks like Quarkus with hot reload capabilities, professionals can counter misconceptions. He also addresses the lack of Java-focused workshops compared to Python and JavaScript, urging the community to actively reach out to students. This collective effort, Felipe believes, is crucial to ensuring the next generation of developers sees Java as a vibrant, modern language, not a relic of the past.
Links:
-
University of North Carolina at Chapel Hill
-
Duke University
Hashtags: #Java #SoftwareDevelopment #Education #Quarkus #GraalVM #UNCChapelHill #DukeUniversity #FelipeYanaga