reklama - zainteresowany?

Modern Concurrency in Java. Virtual Threads, Structured Concurrency, and Beyond - Helion

Modern Concurrency in Java. Virtual Threads, Structured Concurrency, and Beyond
ebook
Autor: A N M Bazlur Rahman
ISBN: 9781098165376
stron: 336, Format: ebook
Data wydania: 2025-09-17
Księgarnia: Helion

Cena książki: 186,15 zł (poprzednio: 216,45 zł)
Oszczędzasz: 14% (-30,30 zł)

Dodaj do koszyka Modern Concurrency in Java. Virtual Threads, Structured Concurrency, and Beyond

Welcome to the future of Java. With this book, you'll explore the transformative world of Java 21's key feature: virtual threads. Remember struggling with the cost of thread creation, encountering limitations on scalability, and facing difficulties in achieving high throughput? Those days are over. This practical guide takes you from Java 1.0 to the cutting-edge advancements of Project Loom.

You'll learn more than just theory. Author A N M Bazlur Rahman equips you with a toolkit for taking real-world action. Take a deep dive into the intricacies of virtual threads and complex topics such as ForkJoinPool, continuation, rate limiting, debugging, and monitoring. You'll not only learn how they work, but you'll also pick up expert tips and tricks to help you master these concepts. And you'll learn about structured concurrency and scoped values—critical skills for building Java applications that are scalable and efficient.

  • Get an in-depth understanding of virtual threads
  • Understand the implementation of virtual thread internals
  • Gain performance improvement in blocking operations
  • Learn why structured concurrency is beneficial
  • Know where to use scoped value
  • Understand the relevance of reactive Java with the advent of virtual threads

A N M Bazlur Rahman is a software engineer with over a decade of experience in Java and related technologies. A speaker at various international conferences and Java user groups, his talks often focus on specialized topics such as concurrency and virtual threads.

Dodaj do koszyka Modern Concurrency in Java. Virtual Threads, Structured Concurrency, and Beyond

 

Osoby które kupowały "Modern Concurrency in Java. Virtual Threads, Structured Concurrency, and Beyond", wybierały także:

  • Cisco CCNA 200-301. Kurs video. Podstawy sieci komputerowych i konfiguracji. Część 1
  • Cisco CCNP Enterprise 350-401 ENCOR. Kurs video. Sieci przedsi
  • Jak zhakowa
  • Windows Media Center. Domowe centrum rozrywki
  • Deep Web bez tajemnic. Kurs video. Pozyskiwanie ukrytych danych

Dodaj do koszyka Modern Concurrency in Java. Virtual Threads, Structured Concurrency, and Beyond

Spis treści

Modern Concurrency in Java. Virtual Threads, Structured Concurrency, and Beyond eBook -- spis treści

  • Preface
    • Why I Wrote This Book
    • Who This Book Is For
    • What This Book Offers
    • How This Book Is Organized
    • How to Read This Book
    • A Hands-On Approach
    • Conventions Used in This Book
    • OReilly Online Learning
    • How to Contact Us
    • Acknowledgments
  • 1. Introduction
    • A Brief History of Threads in Java
      • Java Is Made of Threads
      • Threads: The Backbone of the Java Platform
        • Exceptions and threads
        • Debugger and threads
        • Profiler and threads
    • The Genesis of Java 1.0 Threads
      • Starting Threads
    • Understanding the Hidden Costs of Threads
      • How Many Threads Can You Create?
    • Resource Efficiency in High-Scale Applications
      • The Parallel Execution Strategy
      • Introducing the Executor Framework
      • Remaining Challenges
    • Beyond Basic Thread Pools
      • Cache Affinity and Task Distribution
      • Work-Stealing Algorithm
        • Example of using a Fork/Join Pool
      • Bringing Composability into Play with CompletableFuture
        • Composable and fluent API
        • Advantages of using CompletableFuture
        • Disadvantages and limitations
    • A Different Paradigm for Asynchronous Programming
      • Drawbacks of Using Reactive Frameworks
    • Revolutionizing Concurrency in Java
      • The Promise of Virtual Threads
      • Seamless Integration with Existing Codebases
      • Virtual Threads and Platform Threads
      • Intelligent Handling of Blocking Operations
      • Benefits of Embracing Virtual Threads
    • In Closing
  • 2. Understanding Virtual Threads
    • What Is a Virtual Thread?
      • The Two Kinds of Threads in Java
      • Key Differences from Platform Threads
    • Setting Up Your Environment for Virtual Threads
      • Creating Virtual Threads in Java
    • Adapting to Virtual Threads
    • Demonstrating Virtual Thread Creation in Java
      • Throughput and Scalability
      • The Fundamental Principle Behind Virtual Threads Scalability
        • Virtual threads and Littles Law
      • The Practical Implications
    • How Virtual Threads Work Under the Hood
      • Stack Frames and Memory Management
      • Carrier Threads and OS Involvement
      • Handling Blocking Operations
      • Transparency and Invisibility
      • Simplifying Asynchronous Operations
      • The Promise of Structured Concurrency
    • Managing Resource Constraints with Rate Limiting
      • Understanding Semaphores in Java
      • Why Use a Semaphore?
    • Limitations of Virtual Threads
      • Pinning
      • Addressing the Pinning Problem with ReentrantLock
      • Native Method Invocation and Pinning
    • The Conundrum of ThreadLocal Variables in Virtual Threads
      • Challenges with Virtual Threads
    • Monitoring
      • Monitoring ThreadLocals
      • Monitoring Pinning
        • Using the JVM flag
        • Using the Java Flight Recorder
      • Viewing Virtual Threads in jcmd Thread Dumps
        • Programmatic thread dumps in Java
    • Generating Thread Dumps with HotSpotDiagnosticsMXBean
    • Practical Tips for Migrating to Virtual Threads
      • Reaffirming the Benefits of Virtual Threads
      • Its About Scalability
    • In Closing
  • 3. The Mechanics of Modern Concurrency in Java
    • Thread Pool
      • Why Do We Need a Thread Pool?
      • Building a Simple Thread Pool in Java
      • The Executor Framework
        • FixedThreadPool
        • CachedThreadPool
        • SingleThreadExecutor
        • ScheduledThreadPoolExecutor
        • WorkStealingPool
      • Callable and Future: Handling Task Results
        • Callable
        • Future
    • The ForkJoinPool
      • Why ForkJoinPool for Virtual Threads?
    • Continuation
      • Building Our Own Virtual Threads from Scratch
        • The NanoThread class
        • The NanoThread scheduler
        • Simulating I/O operations with file transfer
        • Putting it all together
      • Virtual Threads and I/O Polling
    • In Closing
  • 4. Structured Concurrency
    • The Challenge of Unstructured Concurrency
    • The Promise of Structured Concurrency
    • Understanding the API
      • StructuredTaskScope
      • Scopes and Subtasks: Relationship and Lifecycle
        • Forking subtasks
        • The fork process
        • Subtask completion
      • Joining Policies with Joiner
      • Common Joining Policies
        • Wait for all to succeed or first to fail
        • Race for the first successful result
        • Gather all results or fail fast
        • Wait for all
        • Resilient concurrent server
          • After first success
      • Exception Handling in StructuredTaskScope
        • Basic exception handling
        • Pattern matching for sophisticated error handling
        • Strategic exception propagation
        • Handling exceptions within subtasks
        • Understanding how different joiners handle exceptions
        • General exceptions
      • Configuration
        • Understanding Configuration
        • Named threads
        • Timeout configuration
        • Combining configuration options
      • Custom Joiners
        • Collecting all results and exceptions
        • Quorum-based completion
        • Adaptive completion
        • Rate-limited joiner
        • Conditional joiners
      • Memory Consistency Effects
      • Nested Scopes
      • Observability
    • In Closing
  • 5. Scoped Values
    • The Burden of Passing Context
      • Parameter Pollution
      • Interface Brittleness
      • Coupling and Testability
    • Introducing ThreadLocal
      • Limitations of ThreadLocal Variables
      • Toward Lightweight Sharing
    • Core Components of ScopedValue
      • Running ScopedValue
        • Rebinding ScopedValue in nested scopes
      • ScopedValue and Structured Concurrency
      • Performance Considerations
      • Usability and API Design
      • Migrating to Scoped Values
    • In Closing
  • 6. The Relevance of Reactive Java in Light of Virtual Threads
    • Understanding Reactive Programming in Java
      • Blocking Versus Non-blocking I/O
      • Event-Driven Architecture
      • Asynchronous APIs
    • Reactive Programming in Java
      • Understanding Reactive Streams
      • Backpressure
        • Comparison and trade-offs
      • Benefits and Downsides of Reactive Programming
        • Benefits of reactive programming
        • Downsides of reactive programming
    • In Closing
  • 7. Modern Frameworks Utilizing Virtual Threads
    • Spring Boot
      • Manual Configuration
    • Quarkus
      • Jakarta EE
    • In Closing
  • 8. Conclusion and Takeaways
  • Index

Dodaj do koszyka Modern Concurrency in Java. Virtual Threads, Structured Concurrency, and Beyond

Code, Publish & WebDesing by CATALIST.com.pl



(c) 2005-2025 CATALIST agencja interaktywna, znaki firmowe należą do wydawnictwa Helion S.A.