To be determined
Welcome to "Java Advanced I: Functional, Asynchronous, and Reactive Programming." This course is designed for experienced Java developers who want to enhance their skills by exploring modern programming paradigms. Functional, asynchronous, and reactive programming approaches are crucial for building high-performance and scalable applications. This course provides an in-depth understanding of these paradigms and equips you with the tools and techniques to implement them effectively.
This course covers the following key topics:
Functional Java: Master functional interfaces, method references, and data streams to write clean and efficient code.
Asynchronous Programming with CompletableFuture: Learn to handle asynchronous tasks using CompletableFuture for better performance and responsiveness.
Reactive Programming with RxJava and Project Reactor: Dive into reactive programming concepts and libraries to build resilient and scalable applications.
By the end of this course, participants will be able to:
Leverage Functional Programming:
Handle Asynchronous Operations:
Build Reactive Applications:
Enroll in "Java Advanced I: Functional, Asynchronous, and Reactive Programming" to master the latest Java programming paradigms. This course offers comprehensive insights and practical skills essential for building high-performance and scalable Java applications. Whether you aim to optimize backend performance, handle large-scale data, or develop reactive web services, this course provides the knowledge and tools you need to excel.
To introduce students to modern asynchronous and reactive programming, plus give examples of usage.
Java developers, Java Architects
Good knowledge of Java (Spring knowledge is desirable)
Module 1. Functional Java [3 hrs]
• Functional interfaces
• Method references
• Data streams
• Map/filter/reduce
• Aggregation functions
• Reducing parallel and sequential processing
• Consumers chaining
• Stream collectors
Homework. Practice [1 hr]
Module 2. Executor framework. Fork Join pool. [3 hrs]
• Using executors
• Future interface
• Using a Callable interface
• Cancelling tasks
• ForkJoin framework
• Creating ForkJoin pool and tasks
• Parallel Streams in Java 8+
• ForkJoin vs. Parallel streams vs. Sequental benchmarks
Module 3. Non-blocking Input/Output [5 hrs]
• Main Differences Between Java NIO and IO
• NIO Channel vs. Stream
• Stream Oriented vs. Buffer Oriented
• Blocking vs. Non-blocking IO
• Java NIO Buffer
• Java NIO Channel
• Direct buffer
• Mapped file buffer
• Java NIO Selector
• Asynchronous I/O with NIO
• File lock
• Production-ready NIO server
• Netty server architecture
Homework. Practice [2 hrs]
Module 4. Asynchronous Java (Completable Future) [6 hrs]
• Problems of synchronous code
• NodeJS architecture
• Processing data flow in parallel
• CompletableFuture sync and async methods
• Combining, composing, and quicker win methods
• Handling exceptions in CompletableFuture
• Cancellation of CompletableFuture
• Using CompletableFuture for real-life Data Flow
Homework. Practice [3 hrs]
Module 5. Reactive programming [9 hrs]
• What is reactivity?
• RxJava basics: Observer and Observable
• Java 9 Reactive Streams
• Side effect methods
• Error handling
• Hot and cold observables
• Shared and connectable observables
• Disposing observables
• Reactive operators (full catalog)
• Subjects
• RxJava concurrency (Schedulers)
• Backpressure and flowables
• Testing reactive streams
Homework. Practice [3 hrs]
Module 6. Project Reactor [5 hrs]
• Reactor Maven dependencies
• Flux/Mono Reactor operators
• Handling backpressure with Reactor
• Reactor Schedulers
• Parallel Flux
• Wrapping synchronous blocking calls
• Testing with Reactor
• Reactor processors
Module 7. Spring WebFlux and practical reactive programming [9 hrs]
• Reactive access to DB
• Reactive R2DBC drivers
• Spring Data reactive repository
• Pagination support
• WebFlux: Functional-based controllers
• Spring REST controllers returning reactive results (Mono/Flux)
• Spring REST controllers returning SSE
• WebClient: retrieving reactive data from the server
• SSE and WebSocket protocols
• Using WebSocket to pass/retrieve JSON data
• Using WebSocket to pass/retrieve binary data
• RSocket protocol
• RSocket controller: server side
• RSocket client with JSON and binary data exchange
• RSocket with load balancing
• RSocket with weighted load balancing
• Using reactive streams with a message broker (RabbitMQ)
• Spring Data MongoDB repository
• Reactive benchmarks: R2DBC vs. JDBC and WebFlux vs. Web MVC
• Architecture and Patterns of reactive programming
Homework. Practice [3 hrs]