Mô tả

This course is structured to give you the theoretical and coding experience writing parallel and asynchronous code using ParallelStreams and CompletableFuture. You will become very Fluent in writing Asynchronous/Parallel Code in Java once you complete this course.

If you are looking forward to writing High Performant Java code then this is the right course for you. This course covers the latest features that are available in Modern Java that helps you write fast performing code.

This course explicitly covers the following APIs in Modern Java:

  • ParallelStreams

  • CompletableFuture

Getting Started with Parallel and Asynchronous programming

  • In this section, I will explain about the need to learn about the Parallel and Asynchronous programming concepts in todays software development

  • Briefly talks about the Evolution of Concurrency APIs in Java

  • Explain about the difference between the Concurrency and Parallelism

Course Project SetUp

  • In this section, we will set up the base project for the whole course.

Threads, Future, ForkJoin FrameWork, and its Limitations

  • In this section, I will explain about Threads, Future API, ForkJoin FrameWork and its limitations

  • I will show a demonstration of all these concepts using code examples.

  • The limitations that are covered in the course sets the stage for ParallelStreams and CompletableFuture API

Getting started with Parallel Streams

  • In this section, I will introduce you all to parallel streams and implement a simple example using Parallel Streams

  • Introduction to Streams API and ParallelStreams

  • Implement a simple example using ParallelStreams 

  • Write unit tests to test the ParallelStreams using JUnit5

Build Retail Checkout Application using Parallel Streams

  • In this section, we will build a simple Backend Retail Checkout application using Parallel Streams

Parallel Streams - Under the hood

  • In this section, I will cover the internals of parallel streams.

  • I will explain about how ParallelStreams work under the hood

  • Compare the performance of different collections when it's used against the ParallelStreams

  • Usage of Collect vs Reduce terminal operators in Streams API and Parallel Streams

  • Operators that can cause poor performance when it's used against ParallelStreams

Parallel Streams - Threading Model & Common ForkJoin Pool

  • In this section, I will explain about the execution engine behind the parallel Streams

  • Covers the Threading model that's utilized behind the scenes by ParallelStreams

  • Configuring the ThreadPool for Faster Performance

Parallel Streams - Summary

  • This section summarizes everything that's discussed above that's related to ParallelStreams

  • Covers the scenarios on "when to use/when not to use" ParallelStreams

CompletableFuture

  • In this section, I will introduce you all to the CompletableFuture API

Exploring CompletableFuture Functions

  • In this section, I will code and explore the functions that are part of the CompletableFuture API

  • Explore some of the key functions that are part of the CompletableFuture API

  • Write unit tests to test the CompletableFuture using JUnit5

Build a ProductService application using CompletableFuture

  • In this section, we will implement the ProductService example using CompletableFuture

  • This section will give you all an idea about how to use CompletableFuture in a real-world scenario

Combining Streams and CompletableFuture

  • In this section, I will show you the techniques to combine Streams with CompletableFuture.

  • I will explore this by adding an enhancement to the ProductService which is the InventoryService

  • Explore the different options available to integrate Streams API with CompletableFuture

Exception Handling/Recovery in CompletableFuture

  • In this section, I will introduce you to to the techniques/options that are to handle/recover exceptions using CompletableFuture

  • I will explain and cover different exception handling and recovery techniques that are available in CompletableFuture

    • handle()

    • exceptionally()

    • whenComplete

  • I will compare and explain the difference of behaviors between them and provide recommendation on using different handlers for different use cases.

Implement Exception Handling/Recovery in ProductService

  • In this lecture, I will show you techniques to implement the exception handling techniques in our ProductService

  • Implement the exception handling and recovery technique in  ProductInfoService, ReviewService and  InventoryService

CompletableFuture & ThreadPool

  • In this section, I will cover the ThreadPool and the different options that are available to use with CompletableFuture

  • I will cover the default CommonForkJoin ThreadPool thats used to execute the CompletableFuture

  • I will cover the techniques to use a Custom ThreadPool that can be used to execute the CompletableFuture

Threads and Async Overloaded Methods in CompletableFuture

  • I will cover the threads that are used to execute CompletableFuture

  • I will show the technique to use Async() methods that's part of the CompletableFuture API to change the execution of threads in the CompletableFuture Pipeline

Build RestFul API Client using Spring WebClient and CompletableFuture

  • In this section, I will build a restful api client using Spring WebClient and Integrate with CompletableFuture to improve the performance of the api calls.

  • I will code and demonstrate how to use Spring WebClient to build a rest client

  • I will code and demonstrate the technique to integrate RestAPI calls with CompletableFuture to improve the overall performance of the code.

Handle Multiple CompletableFutures - anyOf(), allOf()

  • In this section, I will code and explain about the techniques to handle multiple CompletableFutures.

  • I will code and explore the allOf() function thats part of the CompletableFuture API

  • I will code and explore the anyOf() function thats part of the CompletableFuture API

By the end of this course, you will have a complete understanding of ParallelStreams and CompletableFuture and how to use them in your projects.

Bạn sẽ học được gì

Learn to write code that provides faster results using the modern apis in Java

Learn to write Asynchronous/Parallel Programming code using Functional Style APIs

Learn to write parallel programming code using ParallelStreams

Learn to write Asynchronous code using Completablefuture

Learn to write code that uses all the cores in your machine

Techniques and patterns that uses the modern concurrency apis to improve the overall performance of the code

Concurrency vs Parallelism

Yêu cầu

  • Prior Java Experience
  • Java 11 or higher
  • Intellij or Eclipse or Similar IDE

Nội dung khoá học

20 sections

Getting Started With the Course

2 lectures
Course Introduction & Objectives
02:30
Prerequisites
01:06

Course Slides

2 lectures
Course Slides
00:02
Source Code
00:03

Getting Started with Parallel and Asynchronous programming

3 lectures
Why Parallel Programming and Asynchronous Programming?
04:02
Evolution of Concurrency/Parallelism APIs in Java
04:27
Concurrency vs Parallelism
08:20

Course Project SetUp

1 lectures
Course Project SetUp
04:05

Threads, Future, ForkJoin and its Limitations

7 lectures
Section Overview
01:02
Overview of the Service & Code Walkthrough
07:37
Threads and its Limitations - Hands On
11:18
Introduction to ThreadPool/ExecutorService & Future
05:05
ExecutorService/Future and its limitations - Hands On
09:56
Fork-Join Framework
07:41
Fork Join Framework - Hands On
14:35

Getting started with Parallel Streams

5 lectures
Introduction to Streams API & Parallel Streams
04:54
Parallel Streams - Hands On
08:22
Unit Testing Parallel Streams - JUnit5
07:07
Sequential() and Parallel() Functions in Streams API
09:24
Parallel Streams - Transform to lowerCase using Parallel Streams
1 question

Build Retail Checkout Application using Parallel Streams

4 lectures
Overview of the Application
01:57
Implement the Checkout Application using parallel Streams
09:20
Unit Test for the Checkout Application - JUnit5
09:05
Create a cart of 25 elements and Perform the checkout
1 question

Parallel Streams - Under the hood

8 lectures
Parallel Streams - How it works ?
04:46
Comparing Spliterator Performances - ArrayList vs LinkedList - Part 1
12:36
Comparing Spliterator Performances - ArrayList vs LinkedList - Part 2
04:06
Parallel Streams - Final Computation Result Order
06:45
Collect & Reduce Terminal Operation in Parallel Streams
06:22
Collect vs Reduce - Hands On
10:22
Identity in reduce() Operator
07:25
Streams API Operators - Poor Performance
06:20

Parallel Streams - Threading Model & Common ForkJoin Pool

3 lectures
Internals of Common ForkJoin Pool
01:54
Parallelism & Threads in ForkJoin Pool
04:56
Modifying the Default parallelism in Parallel Streams
03:02

Parallel Streams - Summary

1 lectures
Parallel Streams - Summary
02:27

CompletableFuture

1 lectures
Introduction to CompletableFuture
05:43

Exploring CompletableFuture Functions

8 lectures
Lets write our first CompletableFuture
13:43
Transform Data using "thenApply()"
04:55
Unit Testing CompletableFuture using JUnit5
06:30
Assignment - Add the length of the string to the output
2 questions
Combing independent Async Tasks using "thenCombine"
08:59
Combing 3 Independent Async Tasks using "thenCombine"
03:24
Assignment - Combine 4 Independent Async Tasks
2 questions
Invoking Async Tasks using "thenCompose"
06:08

Build ProductService Application using CompletableFuture

3 lectures
Implement ProductService using CompletableFuture - Approach 1
10:59
Implement ProductService using CompletableFuture - Approach 2
01:41
Write the test case for this 'retrieveProductDetails_approach2' function
1 question

Combining Streams and CompletableFuture

3 lectures
Adding Inventory Details to a Product
03:08
Integrate InventoryService in ProductService - Approach 1
10:56
Integrate InventoryService in ProductService - Approach 2
06:25

Exception Handling/Recovery in CompletableFuture

6 lectures
Different Strategies/Options to handle Exceptions in CompletableFuture
02:53
Handle/Recover Exceptions using "handle" function
11:24
Handle/Recover Exceptions using "handle" function - Part2
02:37
Handle/Recover Exceptions using "handle" function - Part3
05:48
Handle/Recover Exceptions using "exceptionally" function
06:43
Handling Exceptions using "whenComplete" function
09:21

Implement Exception Handling/Recovery in ProductService

3 lectures
Handle/Recover Exceptions in ReviewService
09:26
Handle/Recover Exceptions in ProductInfoService
06:12
Assignment - Handle/Recover Exceptions in Inventory Service
1 question

CompletableFuture & Threadpool

2 lectures
CompletableFuture - Default ThreadPool
05:27
CompletableFuture - User Defined ThreadPool using ExecutorService
05:16

Threads and Async Overloaded Methods in CompletableFuture

2 lectures
Threads in CompletableFuture
02:11
Async() overloaded functions in CompletableFuture
06:16

Build RestFul API Client using Spring WebClient and CompletableFuture

5 lectures
Introduction to Spring WebClient and Overview of the Movies RestFul API
09:12
Build the RestClient for MoviesService
11:23
Write JUnit for the MoviesService Rest Client
05:01
Combining CompletableFuture and RestClient
08:20
Retrieving Multiple Movies using Spring WebClient and CompletableFuture
06:28

Handle Multiple CompletableFutures - anyOf(), allOf()

2 lectures
Dealing with Multiple CompletableFutures - allOf()
04:57
Dealing with Multiple CompletableFutures - anyOf()
08:46

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.