Questions tagged [reactive-programming]

Reactive Programming is a programming paradigm oriented around data flows and the propagation of change.

Wiki

Reactive programming is a programming paradigm oriented around data flows and the propagation of change.

This means that it should be possible to express static or dynamic data flows with ease in the programming languages used, and that the underlying execution model will automatically propagate changes through the data flow.


Examples

In a Model-view-controller architecture, reactive programming can allow changes in the underlying model to automatically be reflected in the view, and vice versa.

Unlike Dataflow programming, reactive programming paradigm includes automatic update of variables if variables are dependent on other variables.


Related tags

5669 questions
2
votes
1 answer

Reactor on-demand flux or a sink

Consider a HTTP controller endpoint that accepts requests, validates and then returns ack, but in a meantime in a background does some "heavy work". There are 2 approaches with Reactor (that I'm interested in) that you can achieve this: First…
Slimer
  • 1,123
  • 2
  • 10
  • 22
2
votes
1 answer

How can you keep calling API until you get a certain value?

I'm new to reactive programming and WebClient. I would like to repeatedly call an API until I get a specific value from the API (the API I am calling is a regular API that's configured for event streaming). Once I get the desired value, I would take…
2
votes
1 answer

In Kotlin, how do I convert "CompletableFuture>" to "Flow"?

I'm trying to convert a CompletableFuture> to a Flow. The extension function I'm trying to write is fun CompletableFuture>.asFlowOfNullable(): Flow = this.toMono().map { (if (it.isPresent) it.get() else null)…
2
votes
1 answer

Reactive Programming vs Thread Based Programming

I am new to this concept and want to have a great understanding of this topic. To make my point clear I want to take an analogy. Let's take a scenario of Node JS which is single-threaded and provide fast IO operation using an event loop. Now that…
user10022877
2
votes
1 answer

Failing CompletableFuture based on condition

Is it possible to fail a CompletableFuture based on a condition? In other words, convert a success result into an exceptional result? Is there an API for it? At the moment, I am doing the following, but it feels awkward and…
knittl
  • 246,190
  • 53
  • 318
  • 364
2
votes
0 answers

spring webflux with keycloak authentication over netty server

i want to run webflux based web app using non blocking netty server and authentication using keycloak. seems like keycloak does not support netty server. is there a way to override default behavior of keycloak and use netty instead of tomcat? this…
2
votes
1 answer

Is there any function in reactor.util.retry.Retry that i can use when retry is successful

I need to perform some action immediately after Retry is successful for server-sent event implementation, I was unable to find any method in reactor.util.retry.Retry. Is there any other alternate to do doOnRetrySuccess(func)
2
votes
1 answer

relation between reactive programming and react JS

there is a programming concept called reactive programming, and a variation of JS called react JS. is there any relation between these two?
Ali Sadeghi Aghili
  • 524
  • 1
  • 3
  • 15
2
votes
3 answers

How to zip 2 sequences based on property (zip, join)

I would like to zip the items of 2 sequences based on a common property similar to joining them when using enumerables. How can I make the second test pass? using NUnit.Framework; using System; using System.Collections.Generic; using…
Martin Komischke
  • 1,440
  • 1
  • 13
  • 24
2
votes
1 answer

Change sliderbar color with setSliderColor within reactive output

I'm building a shiny app that has a reactive slider that I want the bar color to be red. I'm trying to use the setSliderColor() function from the shinyWidgets package, but it's not working. My assumption is that it isn't picking up on the sliderId…
J.Sabree
  • 2,280
  • 19
  • 48
2
votes
1 answer

Reactive Extensions support for WPF in .Net 5.0

I am trying to use DispatcherScheduler.Current in an example WPF app, the following line does not resolve the class (static). Does anyone know why this not resolve? public partial class App : Application { public App() { **var…
AwkwardCoder
  • 24,893
  • 27
  • 82
  • 152
2
votes
1 answer

How to query a subselect with sorting and pageable in R2dbcRepository

I am using R2dbcRepository and I think it does not support native queries. @Query(nativeQuery is giving an error. I cannot seem to find a solution for the query without going native since I have join tables, subselect query, and Pageable. I cannot…
sophie
  • 991
  • 2
  • 15
  • 34
2
votes
2 answers

Log inside Mono.error gets outputted twice

For some strange reason, the "User not found" log gets outputted twice in the logs of my application, despite calling findUserById only once. I am not sure what causes this problem. Is there a better way to approach this (logging and throwing an…
2
votes
1 answer

Is it possible to pass leaflet map to another module?

I write an app which I try to modularize. In general, I added leaflet map to my app's body (in main module) and what I want to do is to write some other modules which refer to my main map (showing/hiding points on a map and other spatial…
mustafa00
  • 751
  • 1
  • 7
  • 28
2
votes
2 answers

SwiftUI @Published property not updating views

In the code below, the detail view UI does not update when the FavoriteButton is tapped. We know the binding is connected to the ObservableObject because the didSet is called and prints the updated state of the foos array. Oddly, I found that…
Ben Stone
  • 44
  • 1
  • 5