강의

멘토링

로드맵

BEST
Programming

/

Back-end

Java Concurrency Programming [Reactive Programming Part.1]

You will learn Java's concurrency mechanisms and multithreading techniques in depth and acquire the knowledge and skills necessary to solve various parallel processing problems that you may encounter in practice. Starting from basic thread management, you will learn advanced synchronization techniques, how to use thread pools, and Java's concurrency-related classes in depth.

(4.9) 49 reviews

1,287 learners

  • leaven
동시성
멀티스레드
concurrent
multithread
synchronisation
asynchronous-programming
Java

Reviews from Early Learners

What you will learn!

  • Understanding Java Concurrency

  • Learn various multithreading patterns

  • Understanding synchronization techniques and types

  • Asynchronous programming theory and practice

  • Laying the foundation for reactive programming

An essential part of today's computing environment
Concurrent programming!

With the proliferation of multicore processors and the advancement of distributed computing environments, concurrent programming is more important than ever. Java adapts to these changes by providing powerful concurrent programming features .
This course provides an in-depth study of concurrent programming, an essential skill in modern computing environments, using the Java language.


Learn through practicing various functions and patterns
Java Concurrency Programming

Starting with understanding the Java memory model, you can gain in-depth knowledge of advanced concurrency features such as thread management, synchronization techniques, deadlock resolution strategies, parallel streams, and the asynchronous programming feature CompletableFuture.

In addition to imparting theoretical knowledge, we teach you how to apply the theory to solving real-world problems through real-world coding examples and several case studies, and you will experience Java's synchronization mechanisms firsthand, such as the volatile keyword, synchronized blocks, ReentrantLocks, and Condition objects.

Furthermore, you will learn how to use Java's concurrency utilities, such as Atomic variables, CountDownLatch, CyclicBarrier, and Semaphore. Parallel processing and performance optimization strategies are also important topics to learn.

Furthermore, I am confident that it will serve as a cornerstone for building the fundamental and basic knowledge for reactive programming and will be an important foundation for preparing Virtual Thread, the next-generation thread model for Java .


Courses for beginners, intermediate, and advanced learners

This course is designed for beginners who are new to Java concurrency, as well as intermediate and advanced users who have basic knowledge or experience but want to acquire more in-depth knowledge and deeply understand the core principles, internal structure, and operating methods of Java concurrency and apply them .

Key Learning Contents 💡

This course focuses on three key topics for concurrent programming: Java threads and synchronization, concurrent programming, and asynchronous programming .

1. Understanding Java Threads and Synchronization

In Java, a thread is a lightweight process within a process, representing the concurrent execution flow of a program. It is created by extending the Thread class or implementing the Runnable interface; this allows developers to execute multiple threads concurrently to improve efficiency. After creating a thread, the start() method is called to start it, and its lifecycle is managed through basic APIs such as join(), sleep(), and interrupt(). Thread utilization plays a crucial role in optimizing multitasking and resource sharing, and synchronization is necessary to ensure data consistency and state management when multiple threads execute concurrently.



Synchronization is a crucial concept in multithreading environments, ensuring data integrity by controlling concurrent access to shared resources. In Java, the synchronized keyword allows methods or blocks to be synchronized, ensuring that only one thread can access the synchronized code section at a given time. Furthermore, the Lock interface and its implementation classes enable more granular synchronization control, with ReentrantLock, the most representative implementation, providing reentrant lock functionality.

Java provides a variety of synchronization tools, including CountDownLatch, CyclicBarrier, and Semaphore, which provide advanced synchronization mechanisms for inter-thread cooperation. These tools simplify complex synchronization tasks, such as controlling thread execution order or making threads wait until a specific condition is met. Understanding and utilizing Java's thread and synchronization features is essential for developing multithreaded applications.


So, first, let's look at the general concept of Java threads, the problem of concurrency, and the types and techniques of synchronization.

2. Concurrent Programming

In concurrent programming, a thread pool is a way to efficiently manage and reuse multiple threads. It is implemented through the Executor framework, which consists of interfaces such as ExecutorService and ScheduledExecutorService, and utilizes the Callable and Future interfaces to process tasks with return values and receive their results asynchronously.



ExecutorService is responsible for running and managing the thread pool. It allows you to submit tasks to the thread pool using the submit() method, and safely stop and terminate the thread pool using the shutdown() or shutdownNow() methods.

Additionally, the Executors class provides factory methods for easily creating various types of thread pools, and ThreadPoolExecutor provides a specific execution mechanism for the thread pool, allowing you to optimize performance and resource utilization when processing multiple tasks.

Understanding concurrent programming related to these thread pools is essential for developing Java-based multithreaded applications and is crucial for efficient resource management and high-performance application implementation.



In this part, you will learn how to easily and safely implement concurrent programming in a multi-threaded environment.

3. Asynchronous programming

Asynchronous programming is an essential concurrency paradigm for complex applications, structuring the execution flow of tasks through synchronous and asynchronous methods and the related concepts of blocking and non-blocking calls.

This provides an outline and structure that prevents resources from being wasted when work doesn't complete immediately, allowing the program to continue working on other tasks.


In Java, CompletableFuture provides an API structure for asynchronous programming, providing various methods for starting, executing, and manipulating the results of asynchronous operations, which can be applied widely, from manipulating a single result to composing multiple asynchronous operations.

It also enables more robust and flexible asynchronous programming through the ability to handle waiting and cancellation along with task completion, including mechanisms for exception handling.

In this way, asynchronous programming plays a significant role in increasing the responsiveness of systems, utilizing resources more efficiently, and optimizing the performance of applications.





In this part, we will look at the overall content of asynchronous programming using CompletableFuture.

Course Structure and Detailed Curriculum 🏃

Section 1. Operating System Basics

  • Learn the fundamentals of operating systems, multitasking, and the differences between processes and threads.

  • Understand the fundamentals of concurrent programming and learn the fundamental principles of scheduling through core operating system concepts such as Parallel & Concurrent, Context Switch, CPU Bound & I/O Bound, User Mode & Kernel Mode, etc.

Section 2. Java Thread Fundamentals - Thread Creation and Execution Structure

  • Learn in detail how to create, run, and terminate threads in Java.

  • By simulating the life cycle of a thread for each state, we learn step by step what characteristics and execution flow each state has.

Section 3. Java Thread Fundamentals - Basic Thread API

  • Explains the in-depth concepts and structure of Java's thread-related APIs.

  • Learn in depth about essential concepts for implementing multithreading, such as sleep, join, interrupt, and priority, as well as the structure and flow of connections between the JVM and OS through native method execution.

Section 4. Java Thread Fundamentals - Using Threads

  • Learn how to use threads effectively in real-world projects.

  • We cover topics such as interruption and recovery, and learn about thread groups, thread locals, and thread exception handling.

Section 5. Synchronization Fundamentals - Synchronization Concepts

  • Learn the fundamental concepts of synchronization and its importance in multithreading environments in depth.

  • Learn the fundamental concepts needed to understand synchronization techniques, such as synchronization and its relationship with the CPU, critical sequences, and safe thread configuration, in depth.

Section 6. Synchronization Fundamentals - Synchronization Techniques

  • We cover in depth the various synchronization techniques and how to apply them.

  • Learn about the concepts of locks, such as mutexes, semaphores, monitors, and spin locks, as well as strategies for protecting data and maintaining consistency using synchronization.

Section 7. Java Synchronization

  • Learn in depth the synchronization mechanisms provided by Java.

  • Covers various synchronization mechanisms provided by Java, including the concept of synchronized, condition variables, volatile, and deadlock.

Section 8. Java Locks

  • Learn about Java's Lock interface and various types of classes, and learn how to use Lock and solve synchronization problems using Lock.

  • In particular, we will look at the characteristics, pros and cons of write locks and read locks, and learn how to use conditional variables of locks and how to use them correctly through practical examples.

Section 9. Java Synchronization Tools

  • Learn about the various synchronization tools provided by Java.

  • Learn practical applications using tools such as Atomic Variables, Atomic * FieldUpdater, Countdown Latch, and Cyclic Barrier.

. Section 10. Java Concurrency Framework

  • Understand the concepts and features of the Executor, ExecutorService, and Executors classes provided by Java, and learn how to efficiently manage and optimize multithreaded applications using thread pools.

  • Provides practical knowledge on how to process and manage the results of asynchronous operations through the Future interface.

  • By applying these concepts through real-world examples and exercises, you will be able to solve complex concurrency problems and develop responsive, high-performance Java applications.

Section 11. ThreadPoolExecutor

  • Learn in detail about the principles and usage of ThreadPoolExecutor.

  • We will cover how to create, manage, and optimize thread pools, learn how to efficiently manage resources and exception handling using thread pools, and examine the overall architecture and flowchart.

Section 12: CompletableFuture

  • We delve into CompletableFuture, Java's asynchronous programming feature.

  • This powerful class, introduced in Java 8, starts with the fundamental concepts of asynchronous programming and teaches you how to structure and manage real-world workflows.

  • Each session details various methods and use cases of CompletableFuture, and you'll learn practical techniques for exception handling, result composition, and asynchronous task chaining.

Created this course
Introducing the knowledge sharer.

Jeongsuwon (leaven)

  • Current Java developer

  • Experience in various projects in SI/SM/solution/mobile/front & back-end

  • Performing roles as Architect/PM/PL

  • Github

Recommended for
these people

Who is this course right for?

  • For those who want to experience the world of Java concurrent programming

  • For those who want to clearly establish the overall concept of threads.

  • Anyone who wants to develop applications in a multi-threaded environment

  • For those who want to know a clear concept about synchronization techniques and types.

  • Anyone who wants to know about Java asynchronous programming

Need to know before starting?

  • Java Basics

  • Java Functional Programming and Lambda Usage

Hello
This is

9,875

Learners

327

Reviews

1,210

Answers

4.9

Rating

5

Courses

다양한 프로젝트에서 웹/모바일/솔루션 제품 개발과 관련된 업무를 진행해 오고 있으며 분석/설계/개발 Role 을 맡아 오고 있습니다.

공공기간, 교육프로그램, 기업 프로젝트, 쇼핑몰 등의 웹 개발 및 솔루션 프로그램, 프레임워크, 오픈소스 연동 등의 아키텍처 설계 및 구조적 고도화 개선 등을 해 오고 있으며 개발, PL 등의 역할을 맡았습니다.

다양한 Open Source 와 여러 기술적인 경험들을 통해 웹의 전반적인 기술 흐름들을 익혔으며 개발 경험이 거듭될 수록 요구사항의 기능 구현에만 거치지 않고 좀 더 OOP 적인 구조의 소프트웨어로서 안전성과 성능을 고려한 아키텍처링과 튜닝의 기술들을 접목시켜 지속적으로 더 훌륭한 소프트웨어를 완성하기 위한 연구와 개발 실무를 책임감 있게 맡아 오고 있습니다.

 

Curriculum

All

103 lectures ∙ (44hr 9min)

Course Materials:

Lecture resources
Published: 
Last updated: 

Reviews

All

49 reviews

4.9

49 reviews

  • hanjn28429394님의 프로필 이미지
    hanjn28429394

    Reviews 29

    Average Rating 5.0

    5

    100% enrolled

    I listened very well!!!! It was a good lecture!

    • hoestory님의 프로필 이미지
      hoestory

      Reviews 15

      Average Rating 5.0

      5

      30% enrolled

      I understand each and every content you lectured on, such as concurrency and parallelism. I was able to completely understand the parts I didn't know or was confused about. Thank you for the great lecture.

      • ats30591794님의 프로필 이미지
        ats30591794

        Reviews 7

        Average Rating 5.0

        5

        19% enrolled

        If you lack the concept of threads, this is a lecture that I definitely recommend! It's still a long way to go to finish it, but it's a lecture that I really don't regret spending money on! How great it would have been if I had someone like this as my teacher..! Anyway, I highly recommend it! I'm looking forward to the next lecture! I enjoyed the security lecture too~ I would appreciate it if you would hold a lecture related to DB in the future!

        • leaven
          Instructor

          Yes I hope this thread will solidify the concept and become a foundation for further growth Thank you!!

      • zzanggoon8님의 프로필 이미지
        zzanggoon8

        Reviews 16

        Average Rating 5.0

        5

        100% enrolled

        I've been listening since Spring Security, and I think the strength of instructor Jeong Su-won is the detailed and thorough explanations in the lecture materials. !!! Preparing these lectures is a lot of work in itself, and I'm always grateful. This is a lecture that you must listen to as you grow as a junior developer!!!

        • leaven
          Instructor

          Yes, thank you. I sincerely hope that you will continue to grow as a developer, Su-Hwan-Mu!!

      • pcdoomco8559님의 프로필 이미지
        pcdoomco8559

        Reviews 1

        Average Rating 5.0

        5

        6% enrolled

        I will study hard and master it.

        • leaven
          Instructor

          Yes pcdoom.co I will definitely cheer for you to master it^^ Thank you~

        • In the future, I really want to listen to lectures on Spring web development, not just Spring Security by Jeong Su-won. I think all the lectures are really detailed.

        • leaven
          Instructor

          Yes I will continue to strive for continuous growth as a developer Thank you~

      Limited time deal

      $58.30

      24%

      $77.00

      leaven's other courses

      Check out other courses by the instructor!

      Similar courses

      Explore other courses in the same field!