Flashcards

Quick study sessions to strengthen memory and retain key concepts.

Flashcard Study

Java: Backpressure Strategies

Front

Why does 'Publisher' in Reactive Streams matter in this design?

It produces data and sends it to the Subscriber. The Publisher is the source of data in Reactive…

View Card →
Flashcard Study

Java: Backpressure Strategies

Front

Why is backpressure crucial in Reactive Streams?

It prevents fast Publishers from overwhelming slow Subscribers. Backpressure ensures that the data flow is regulated, maintaining system…

View Card →
Flashcard Study

Java: Backpressure Strategies

Front

How does a Subscriber signal it can't keep up?

A Subscriber uses Subscription.request(n) to control the rate. In Reactive Streams, a slow Subscriber can manage the data…

View Card →
Flashcard Study

Java: Backpressure Strategies

Front

What makes the Event Loop non-blocking in Reactive Streams?

It uses asynchronous I/O to handle multiple connections without waiting. Non-blocking architecture allows the Event Loop to handle…

View Card →
Flashcard Study

Java: Backpressure Strategies

Front

Can backpressure be configured to drop or buffer items in a fast data stream?

Yes, you can choose to drop or buffer items. In Project Reactor, you can configure backpressure to either…

View Card →
Flashcard Study

Java: Backpressure Strategies

Front

How would you explain a common mistake when using request(n) in Reactive Streams in an interview?

Requesting too many items can overwhelm the Subscriber. A common mistake is overestimating the Subscriber's capacity, leading to…

View Card →
Flashcard Study

Java: Backpressure Strategies

Front

What role does a Subscriber play in Reactive Streams?

It consumes items emitted by the Publisher based on its demand. A Subscriber in Reactive Streams requests and…

View Card →
Flashcard Study

Java: Backpressure Strategies

Front

How does WebFlux's non-blocking nature compare to Virtual Threads?

WebFlux uses event-driven concurrency; Virtual Threads use lightweight threads. WebFlux is designed for non-blocking IO using event loops,…

View Card →
Flashcard Study

Java: Backpressure Strategies

Front

Why is map preferred over flatMap for simple transformations in Project Reactor?

map is simpler and more performant for direct transformations. The map operator is used for straightforward transformations of…

View Card →
Flashcard Study

Java: Backpressure Strategies

Front

How would you explain the mathematical basis for preventing buffer overflow in Reactive Streams in an interview?

It's based on demand-driven data flow using request(n). Reactive Streams use a demand-driven model where Subscribers control the…

View Card →