Reactive Java Course

Reactive Java chuyên sâu

Từ Java Concurrency, CompletableFuture và Event Loop đến Reactive Streams, Project Reactor, Spring WebFlux, Vert.x và hai project cuối khóa cùng một bài toán.


Module 01–05 — Foundation

Các module nền tảng của khóa học. Nên đọc tuần tự từ Module 01 đến Module 05.

Module 01

Scope & Course Architecture

Completed

Baseline phiên bản, target reader, roadmap, chapter template, terminology và Definition of Done.

Mở Module 01 →
Module 02

Official Source Map

Completed

Ground truth từ Java, Reactive Streams, Reactor, Spring và Vert.x official documentation.

Mở Module 02 →
Module 03

Java Concurrency Foundation

Executable

Threads, race condition, visibility, synchronization, thread pools, deadlock và Virtual Threads.

Học Module 03 →
Module 04

CompletableFuture

Executable

Future, async composition, thenApply/thenCompose, combining, executor semantics, errors và timeout.

Học Module 04 →
Module 05

NIO & Event Loop

Executable

Blocking vs non-blocking I/O, Selector, SelectionKey, event loop, blocking experiments và tail latency.

Học Module 05 →

Roadmap học tập

Đi theo thứ tự từ nền tảng đến framework. Không nên nhảy qua Reactive Streams hoặc Event Loop.

Java Concurrency Thread Pool Virtual Threads CompletableFuture Java NIO Event Loop Reactive Streams Project Reactor WebFlux Vert.x Production Capstone

Foundation

Nắm bản chất concurrency, async, blocking và event loop trước khi học framework.

Đọc Foundation study companion (Module 03–07) → [legacy source: modules/03-07-foundation-guide.md]

Module 03

Java Concurrency Foundation

Executable

Thread, race condition, synchronization, thread pool, deadlock, virtual threads và blocking server lab.

P0~55 trang
Mở Module 03 →
Module 04

CompletableFuture & Async Composition

Executable

Future, CompletionStage, thenApply, thenCompose, executor semantics, timeout và cancellation.

P0~40 trang
Mở Module 04 →
Module 05

Java NIO & Event Loop

Executable

Blocking I/O, NIO, Selector, readiness model, event loop và “Never block the event loop”.

P0~40 trang
Mở Module 05 →

Reactive Core

Từ Reactive Streams protocol đến Reactor operators, scheduler và backpressure.

Module 06

Reactive Streams

Executable

Publisher, Subscriber, Subscription, demand, cancellation, protocol rules và backpressure.

P0~35 trang
Mở Module 06 →
Module 07

Project Reactor

Executable

Mono, Flux, map/flatMap, error handling, schedulers, backpressure, testing và debugging.

P0~70 trang
Mở Module 07 →

Spring WebFlux

Reactive web stack trong Spring ecosystem.

Module 08

Spring WebFlux

Executable + guide

Architecture, controllers, functional endpoints, WebClient, R2DBC, Security, SSE, WebSocket và testing.

P1~85 trang
Mở Module 08 →

Vert.x

Event-driven toolkit với Verticle, Context, Future, Event Bus, Router và SQL Client.

Module 09

Vert.x Core

Executable + guide

Vertx instance, Context, Event Loop, VerticleBase, Future, Promise, workers, HTTP và Event Bus.

P1~75 trang
Mở Module 09 →
Module 10

Vert.x Web & Data

Executable + guide

Router, RoutingContext, WebClient, PostgreSQL Client, transactions, validation và testing.

P1~50 trang
Mở Module 10 →

Production & Comparison

Đưa kiến thức framework về bài toán production, reliability và trade-off thực tế.

Module 11 · Production topics

Production Reactive Systems

Guide + runnable capstone

Timeout, retry, circuit breaker, idempotency, observability, tracing, load testing, latency và bottleneck analysis.

P1~45 trang
Mở Module 11 →
Module 11 · Comparison

WebFlux vs Vert.x

Guide + runnable capstone

So sánh async abstraction, threading, backpressure, HTTP model, architecture, complexity và Virtual Threads.

P1
Mở Module 11 →

Capstone Projects

Cùng một business problem, hai implementation khác nhau để so sánh công bằng.

Module 13

Reactive Order Platform — WebFlux

Executable guide

Spring Boot + WebFlux + Reactor + WebClient + R2DBC + Reactive Redis + SSE + observability.

ProjectSame API contract
Mở Module 13 →
Module 14

Reactive Order Platform — Vert.x

Executable guide

Vert.x Core + Web + Future + Verticles + Event Bus + WebClient + PostgreSQL Client + SSE.

ProjectSame API contract
Mở Module 14 →

Benchmark & Final Review

Không tìm framework “thắng tuyệt đối”; mục tiêu là hiểu behavior và trade-off.

100 → 5,000 concurrent users
p50 / p95 / p99 latency
CPU / Memory / GC
Thread & event-loop metrics
Slow DB / slow downstream
Blocking injection experiments

Mở Benchmark Report →

Quy tắc học

Các nguyên tắc xuyên suốt toàn bộ giáo trình.

Async ≠ Reactive
Không đồng nhất hai khái niệm.
Reactive ≠ luôn nhanh hơn
Phải đo workload thực tế.
Never block the event loop
Luôn nhận diện blocking call.

Toàn bộ Module 01–16

Learning path + project path hoàn chỉnh.