How reactor/reactor-core works
Main Components Identification
The system should be divided into these key components:
a. Core Publishers
• Flux (multi-element stream)
• Mono (0-1 element stream)
• ParallelFlux (parallel processing stream)
b. Scheduler System
• Various scheduler implementations
• Thread management components
• Execution context handlers
c. Operators Layer
• Stream transformation operators
• Error handling operators
• Flow control operators
d. Infrastructure Components
• Context propagation system
• Backpressure management
• Queue implementations
• Metrics & monitoring
Relationships and Interactions
[Publisher Sources] → [Operators Chain] → [Subscribers]
• ↑ ↕ ↓
• [Scheduler System]───────────┘
• ↕
• [Infrastructure Layer]
Detailed Component Breakdown
Publishers Section:
┌─ Publishers ─────────┐
• Flux │
• Mono │
• ParallelFlux │
• ConnectableFlux │
• ┘
Operators Section:
┌─ Operators ──────────────┐
• Transformation │
• Combination │
• Filtering │
• Error Handling │
• Backpressure Control │
• ┘
Features
• Operator fusion optimization paths
• Context propagation channels
• Error recovery paths
• Subscription lifecycle
• Resource cleanup flows
Documentation Elements
Annotations:
• Thread boundary crossings
• Backpressure control points
• Fusion optimization opportunities
• Hot vs cold publisher distinctions
Implementation Notes
• Non-blocking nature of operations
• Reactive Streams specification compliance
• Integration points with other systems
• Extension and customization points