How to build Reactive Server in 50 minutes
summary
Builds a non‑blocking TCP server from Java NIO selector and ServerSocketChannel, wires it to Project Reactor operators, uses unicast processors for read/write events and Reactor schedulers to pin each connection to one worker. Demonstrates backpressure in practice and survives a 5,000 concurrent connections test without spawning thousands of OS threads. Provides concrete code patterns: register on subscribe, baseSubscriber for writes, publishOn for parallelism, and unit tests that assert backpressure and correctness.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 2:01Reactive server engine goals
- 4:41Code example of reactor
- 6:02Limitations of blocking I/O
- 10:05Thread pool limitations
- 14:17Introduction to Java NIO
- 17:32NIO data handling
- 18:50NIO implementation details
- 23:15NIO complexity
- 24:52Introduction to Reactive Streams
- 27:04Project Reactor components
- 30:25Implementing the connection
- 34:41Data writing with backpressure
- 39:14Efficient data processing
- 42:00Reactive server implementation
- 46:41Performance demonstration
- 50:53Summary and Q&A
related talks
54mHow to build Reactive Server in 50 minutes
01h 21mReactive Web Applications
47mReactive Spring
40mReactive programming: lessons learned
29mBuilding Reactive Systems with Reactor
01h 32mBuilding Reactive applications with Reactor and the Reactive Streams standard
49mReactive Spring
48mReactive for the Impatient
