Spring Reactive Programming Flashcards

1
Q

What is reactive programming in Spring?

A

A programming paradigm focused on handling asynchronous data streams and non-blocking operations, supported by Spring WebFlux.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Spring WebFlux?

A

A reactive web framework in Spring for building non-blocking, asynchronous applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Mono in Spring WebFlux?

A

A reactive type representing a single asynchronous result or none.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Flux in Spring WebFlux?

A

A reactive type representing a stream of multiple asynchronous results.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is @EnableWebFlux in Spring?

A

An annotation to enable Spring WebFlux for building reactive web applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the difference between Spring MVC and Spring WebFlux?

A

Spring MVC is synchronous and blocking, while WebFlux is asynchronous and non-blocking.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is backpressure in reactive programming?

A

A mechanism for controlling the flow of data between producers and consumers to avoid overwhelming the consumer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you handle errors in Spring WebFlux?

A

Using methods like onErrorResume() or onErrorReturn() to handle exceptions reactively.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Reactor in Spring?

A

A reactive library used by Spring WebFlux to implement the Reactive Streams API.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the @Controller annotation used for in Spring WebFlux?

A

It is used to define a reactive web controller in Spring WebFlux.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly