Java Advanced: Functional, Asynchronous, and Reactive Programming
Czas trwania
36
hours
Lokalizacja
Online
Język
English
Kod
JVA-074
Labels
Advanced
Szkolenie dla #uczestników# lub większej liczby osób?
Dostosuj treningi
dla Twoich konkretnych potrzeb
Opis
In our course we look at the contemporary functional and reactive approaches to Java development (for increasing backend performance). The training covers subjects such as non-blocking input/output NIO2, asynchronous promises CompletableFuture, reactive programming libraries RxJava and Reactor, async DB access interface R2DBC and more. We also include the streaming protocol SSE, reactive Spring Data repositories, WebClient, WebSocket and RSocket protocols, as well as practical examples.
Po ukończeniu kursu na formularzu Luxoft Training
wydawany jest certyfikat
wydawany jest certyfikat
Cele
- Offer an introduction to modern asynchronous and reactive programming
- Examples of how modern asynchronous and reactive programming is used
Grupa docelowa
- Java developers
- Java Architects
Warunki wstępne
- Good knowledge of Java (Spring knowledge is desirable)
Plan działania
- 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 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) [5 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 [2 hrs]
- Module 5. Reactive programming [8 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 [2 hrs]
- Module 6. Project Reactor [4 hrs]
- Reactor Maven dependencies
- · Flux/Mono Reactor operators
- · Handling backpressure with Reactor
- · Reactor Schedulers
- · Parallel Flux
- · Wrapping a synchronous blocking calls
- · Testing with Reactor
- · Reactor processors
- Module 7. Spring WebFlux and practical reactive programming [8 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 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 [2 hrs]
- Total: theory 36h, practice (homework) 7h
Courses you may be interested in
New features of Java 8 (stream, API)
This training is designed to help participants understand these new features of Java 8. The course covers lambda expressions, data streams, stream data processing with map-filter-reduce approach, asynchronous programming and DateTime API.
JVA-030
12 hours
Java Advanced II: High Performance Java
This course focuses on improving the performance of Java applications: identifying bottlenecks, approaches / methods for improving performance, and tools / libraries to achieve high performance.
JVA-076
40 hours