reactive-programming Questions

3

I'm always confused about how to stream a response back to the client, for example a large csv file, and I'd like to ask some questions: I'm reading the file line by line and write directly to the...
Desmoid asked 10/8, 2020 at 12:51

2

Solved

I have a User entity and a Role entity. The fields are not important other than the fact that the User entity has a role_id field that corresponds to the id of its respective role. Since Spring Dat...

2

Solved

I'm trying out the new WebClient from Spring 5 (5.0.0.RC2) in a codebase that uses reactive programming and I've had success mapping the JSON response from an endpoint to a DTO in my app, which wor...

8

Solved

TL;DR How to convert Task.whenAll(List<Task>) into RxJava? My existing code uses Bolts to build up a list of asynchronous tasks and waits until all of those tasks finish before performing ot...
Remanence asked 12/2, 2016 at 8:28

1

Solved

I am new to reactive programming and to get my hand on I am trying to build a near to real example. When you see reactor tutorials they show you very easy examples like. return userRepository.findB...
Millwater asked 3/7, 2020 at 19:9

3

Imagine I'm using a bloc to handle a network request. If the request fails, the way to handle the failure would be different depending on the platform. On my web app, I would like to redirect the u...

2

Is this an ideal way to find execution time of method (getFavouriteDetails()), in reactive programming ? public List<Favourites> getFavouriteDetails(String userId){ userService.getFavorites...
Subjunctive asked 5/7, 2018 at 21:4

2

I am receiving a JSON array from an api where images have a live link. So, after the success I am rendering the data, problem is I want to show an gif until the images load completely. The array i...
Loaning asked 26/3, 2019 at 5:10

4

Solved

Here is a picture of what I am attempting to accomplish. --a-b-c-a--bbb--a split into --a-----a-------a --> a stream ----b------bbb--- --> b stream ------c---------- --> c stream Then, be abl...
Penalize asked 4/3, 2015 at 12:36

2

When I have used Pub/Sub pattern frameworks like MVVMLight before, I have seen that the subscriber's calls are handled synchronously. From a scalability point of view, does a reactive framework lik...
Erector asked 11/6, 2015 at 14:57

7

Solved

I'd like to use Micrometer to record the execution time of an async method when it eventually happens. Is there a recommended way to do this? Example: Kafka Replying Template. I want to record the...
Illusionary asked 16/3, 2018 at 0:35

3

Let's say i have the following chain: public Mono<B> someMethod( Object arg ) { Mono<A> monoA = Mono.just( arg ).flatMap( adapter1::doSomething ); // success chain return monoA.map(...
Thesaurus asked 18/4, 2018 at 11:7

2

How do I populate the NSTableview with an array using reactive framework? In iOS for UITableview: self.viewModel.arrayElements.asObservable() .observeOn(MainScheduler.instance) .bind(to: detai...

5

Solved

I am learning reactive programming and functional reactive programming in JavaScript. I am very confused. Wikipedia says that there are various ways to write reactive code such as imperative, OORP...
Exogenous asked 28/12, 2015 at 14:11

1

I may be wrong, but as far as I understand, the whole Reactive/Event Loop thing, and Netty in particular, was invented as an answer to the C10K+ problem. It has obvious drawbacks, as all your code ...
Selfrising asked 2/10, 2019 at 17:50

3

Solved

Why doesn't the flatMap cause downstream reductions to fire? I got code like: handleFiles.flatMap(files => Rx.Observable.from(files). flatMap((file, i) => fileReader(file, i)). reduce((f...

4

Solved

I'm trying to throw an error inside a rxjs Observable new Observable(subscriber => { Observable.throw("error1"); return Observable.throw("error2"); }) .subscribe( () => {}, err => ...
Ratel asked 15/2, 2017 at 11:4

1

Solved

As per my understanding, in Spring WebFlux reactor Mono<Void> refers for a void Mono Mono.empty() refers to void, as calling anything over this gives a null pointer. How do these stand di...
Neath asked 15/5, 2020 at 15:27

2

Below you can see my code that I have simplified for readability and clarity: connect(): Observable<Customer[]> { const displayDataChanges = [ this._customerDatabase.dataChange, this._fil...
Roaster asked 2/8, 2017 at 8:41

2

Solved

In my customer-detail component I have the following code that achieves what I'm after but not in the reactive/observable way I think might be possible. Instead of wrapping this.isLoading = true; ...
Wexford asked 16/1, 2017 at 1:40

1

Solved

I use Spring WebFlux (Project Reactor) and I'm facing the following problem: I have to get some data from db to use them to call another service - everything in one stream. How to do that? public ...
Mitchmitchael asked 27/4, 2020 at 19:24

1

In RxJava 2 and Reactor there is a switchIfEmptylike method to switch to new flow if there is no elements in current flow. But when I began to use Minuty, I can not find an alternative when I conv...
Ferrara asked 10/4, 2020 at 13:4

1

Solved

I know pagination is somewhat against reactive principles, but due to requirements I have to make it work somehow. I'm using Spring Data 2.1.6 and I can't upgrade so ReactiveQuerydslSpecification f...

5

Solved

I´m trying to figure out how handle errors when mapping elements inside a Flux. For instance, I´m parsing a CSV string into one of my business POJOs: myflux.map(stock -> converter.convertHisto...
Lexi asked 26/3, 2016 at 15:39

2

Solved

I'm new to RxJava, and I need to use the Observable feature in an asynchronous way. I also need to use timeouts : in my exemple, I want every process to end in 1 second or less. Here is what I'v...
Unipersonal asked 5/10, 2017 at 8:13

© 2022 - 2024 — McMap. All rights reserved.