Flashcards

Quick study sessions to strengthen memory and retain key concepts.

Flashcard Study

Java: Non-Blocking I/O (Event Loops)

Front

What role does the Subscriber play in Reactive Streams?

A Subscriber consumes data emitted by a Publisher. In Reactive Streams, a Subscriber receives data from a Publisher.…

View Card →
Flashcard Study

Java: Non-Blocking I/O (Event Loops)

Front

Why is decoupling the HTTP connection from the execution thread important?

It increases scalability by separating network handling from processing. Decoupling the HTTP connection from the execution thread allows…

View Card →
Flashcard Study

Java: Non-Blocking I/O (Event Loops)

Front

How does backpressure work in Reactive Streams?

It manages the flow of data between Publisher and Subscriber. Backpressure is a key concept in Reactive Streams…

View Card →
Flashcard Study

Java: Non-Blocking I/O (Event Loops)

Front

What defines a Reactive Streams Publisher?

An entity that produces data and sends it to subscribers. In the Reactive Streams specification, a Publisher is…

View Card →
Flashcard Study

Java: Non-Blocking I/O (Event Loops)

Front

How would you explain the danger of blocking the event loop in an interview?

It can lead to unresponsive applications. Frame the concept in practical terms so you can explain it during…

View Card →
Flashcard Study

Java: Non-Blocking I/O (Event Loops)

Front

How does Spring WebFlux utilize CPU resources?

It uses a fixed number of threads, typically one per CPU core. Spring WebFlux optimizes CPU usage by…

View Card →
Flashcard Study

Java: Non-Blocking I/O (Event Loops)

Front

How would you explain a non-blocking event loop in an interview?

An event loop that doesn't wait for tasks to complete. A non-blocking event loop allows a program to…

View Card →
Flashcard Study

Java: Functional Pipelines (flatMap)

Front

Why might you limit `flatMap()` concurrency?

To keep the reactive pipeline from flooding a database or HTTP dependency with too many concurrent calls. Reactive…

View Card →
Flashcard Study

Java: Functional Pipelines (flatMap)

Front

Why would you choose `concatMap()` instead of `flatMap()`?

Use `concatMap()` when order matters and you want one inner publisher processed at a time. `concatMap()` trades concurrency…

View Card →
Flashcard Study

Java: Functional Pipelines (flatMap)

Front

What hidden behavior does `flatMap()` often introduce?

`flatMap()` can run inner work concurrently and may reorder results. That behavior is useful when you want throughput,…

View Card →