More Goto tech episodes

Modern Concurrency in Java  Bazlur Rahman & Michael Redlich thumbnail

Modern Concurrency in Java Bazlur Rahman & Michael Redlich

Published 9 Jun 2026

Duration: 00:34:45

Modern Java concurrency explores the shift from traditional threads to virtual threads (JDK 21) and structured concurrency, emphasizing scalability for I/O-bound tasks, task management simplification, limitations in CPU-bound work, comparisons with reactive programming, adoption challenges, and the book's unification of knowledge around Project Loom and scoped values for intermediate developers.

Episode Description

This interview was recorded for the GOTO Book Club. http://gotopia.tech/bookclub A N M Bazlur Rahman - Java Champion & Author of "Modern Concurrency i...

Overview

The podcast/book club segment centers on software development insights, exploring practical and theoretical advancements in Java concurrency. Key topics from Modern Concurrency in Java include the evolution of Javas threading model from its early days, the advantages and limitations of virtual threads introduced in JDK 21, and modern tools like thread pools, structured concurrency, and scope values. The discussion emphasizes the shift from traditional threads to lighter, more scalable virtual threads, which enable high throughput for I/O-bound applications while simplifying code complexity. Reactor frameworks (e.g., Vert.x, Spring Boot) and non-blocking I/O models are compared, alongside the practical relevance of concurrency for performance, scalability, and distributed systems development.

The evolution of Javas concurrency model is contextualized, tracing its progression from early threads to reactive programming and the introduction of structured concurrency, which improves task coordination and failure management. The book addresses the misconception that Java is stagnant, highlighting recent innovations like Project Loom and virtual threads as pivotal to modern development. Practical considerations for adoption include evaluating frameworks and tools for compatibility with virtual threads, addressing limitations in CPU-bound workloads, and carefully implementing structured concurrency, which is still in preview stages. The content underscores the importance of foundational concurrency knowledge for intermediate developers, bridging historical practices with current tools to optimize application design and performance. Frameworks such as Spring Boot and Quarkus are noted for their support of virtual threads, enabling streamlined integration into existing systems.

What If

  • What if you adopted virtual threads as the default concurrency model for your next application?

    • Move: Integrate virtual threads into your application's architecture using Spring Boot or Quarkus for minimal configuration.
    • Why Now?: JDK 21 has stabilized virtual threads, and modern frameworks now support them out of the box, reducing the learning curve and resource overhead.
    • Expected Upside: Scalability for I/O-bound tasks (e.g., microservices) with lower memory usage and simplified code compared to traditional thread pools.
  • What if you prototyped structured concurrency in non-critical systems to gain early familiarity?

    • Move: Implement structured concurrency in a prototype or internal tool to manage task lifecycles and dependencies explicitly.
    • Why Now?: Structured concurrency is nearing final release (JDK 27), and experimenting now prepares you for production adoption while mitigating risks in stable systems.
    • Expected Upside: Reduced orphaned tasks and improved failure handling in I/O-heavy workflows, such as parallel request processing.
  • What if you evaluated replacing reactive programming with virtual threads in your existing I/O-bound services?

    • Move: Audit I/O-bound components (e.g., API calls, database queries) and replace reactive patterns (e.g., streams, back-pressure) with virtual threads.
    • Why Now?: Virtual threads simplify debugging and integrate seamlessly with Java tooling, while reactive programming introduces complexity that may not be necessary for your use case.
    • Expected Upside: Faster development cycles and lower maintenance overhead, with the same or better throughput for I/O-bound workloads.

Takeaway

  • Adopt virtual threads as the default concurrency model for new applications by leveraging JDK 21's support and framework integrations (e.g., Spring Boot, Quarkus, Helidon) to simplify I/O-bound workloads and avoid manual thread management.
  • Experiment with structured concurrency in non-critical systems (e.g., prototypes, internal tools) to familiarize yourself with its benefits, such as task lifecycle management and failure cancellation, while waiting for its final release in JDK 27.
  • Evaluate framework compatibility and observability tools before replacing existing systems with virtual threads, as early JDK 21 versions had issues like pinning, and production readiness requires thorough testing.
  • Compare virtual threads and reactive programming based on your use case: use virtual threads for simpler I/O-bound tasks (via familiar Java APIs) and reactive programming for event-driven systems requiring back-pressure or stream processing.
  • Deepen your understanding of modern concurrency principles by studying Modern Concurrency in Java to make informed decisions on when to apply virtual threads, structured concurrency, or reactive patterns for performance optimization and scalability.

Recent Episodes of Goto tech

16 Jun 2026 Go for Java Programmers Barry Feigenbaum & Shon Saliga

Go emphasizes simplicity, concurrency, and efficiency for lightweight applications through explicit error handling and goroutines, while Java offers a feature-rich, object-oriented framework with extensive libraries and inheritance for complex, general-purpose systems, each suited to distinct development priorities and domains.

12 Jun 2026 Engineering Leadership in Turbulent Times Sarah Wells, Pat Kua & Daniel Terhorst-North

The text contrasts technical leadership and management, highlighting leadership's emphasis on vision and team alignment with management's focus on systems and accountability, while exploring change strategies, frameworks like the "Three Threes Model," challenges in technical debt and cross-functional alignment, and the role of communication, culture, and adaptability in fostering innovation.

5 Jun 2026 Roc & Zig: A Compiler Rewrite Story Anjana Vakil & Richard Feldman

The text covers Rock's evolution as a simplified, statically typed alternative to Elm with a Zig-based compiler, AI's expanding role in software development beyond automation, open-source challenges, education's shift toward conceptual understanding, and the tension between rapid AI-driven productivity and quality-focused project development.

More Goto tech episodes