Scaling Java Applications Through Concurrency
Distributed systems and multi-core platforms are far too prevalent now to dismiss everyday concurrency. This course outlines several concurrency patterns that the Java Concurrency API simplifies, making it much easier to scale your Java application.
What you'll learn
There are several gems inside the existing concurrency API that have been hiding in the background for years, waiting to be discovered by curious software engineers. The existing Java Concurrency API makes it much easier to build a Java application that is scalable and performant without having to settle for lots of low-level wait-notify usage or lots of locking using the synchronized keyword. In this course, Scaling Java Applications Through Concurrency, you'll cover several concurrency patterns simplified by the Java Concurrency API; these patterns will make scaling new and existing Java applications simpler than ever. First, you'll learn about how the Java Concurrency API has changed scalability and how to run processes in the background. Next, you'll cover classes that will help you avoid mistakes like lost updates when sharing resources. Finally, you'll discover how to coordinate dependent processes and implementing throttling. By the end of this course, you will be able to easily scale your Java applications through concurrency so that they work better and faster.
Table of contents
- The Fire-and-Forget Pattern 3m
- Introducing ThreadPoolExecutor 4m
- Implementing Fire-and-Forget Using ThreadPoolExecutor 7m
- Introducing ForkJoinPool 2m
- Implementing Fire-and-Forget Using ForkJoinPool 1m
- Introducing Threaded Recursion with ForkJoinPool and BlockingQueue 2m
- Implementing Fire-and-Forget Using Threaded Recursion 4m
- Conclusion 1m
- Introduction 0m
- The Scatter-Gather Pattern 2m
- Scatter-Gather Using Futures 3m
- Scatter-Gather Using ExecutorService 4m
- ExecutorService vs. ExecutorCompletionService Performance 2m
- The Importance of Making Aggregations Thread-safe 3m
- Gathering Using Concurrency Primitives 4m
- Gathering Using AtomicInteger, ConcurrentHashMap, and LongAdder 4m
- Gathering Using ReentrantLock 4m
- Max Search Using TryLock 3m
- Conclusion 1m
- Introduction 1m
- Dependency Choreography Using CountDownLatch 3m
- Implementing Dependency Choreography Using CountDownLatch 3m
- Dependency Choreography Using Continuation-passing 5m
- Implementing Dependency Choreography Using Continuation-Passing 17m
- Dependency Choreography Using CompletableFuture 3m
- Implementing Dependency Choreography Using CompletableFuture 6m
- Addressing Thread Contention Using Thread Pools 3m
- Conclusion 1m
- Introduction 3m
- Throttling Using ThreadPoolExecutor 3m
- Implementing Throttling Using ThreadPoolExecutor 7m
- Throttling Using Semaphore 2m
- Implementing Throttling Using Semaphore 4m
- Throttling Using CyclicBarrier 3m
- Implementing Throttling Using CyclicBarrier 6m
- Throttling Using Phaser 3m
- Implementing Throttling Using Phaser 5m
- Performance Metrics Breakdown 2m
- Conclusion 1m