Questions tagged [reactive]
Reactive programming is the general approach to implementing systems in a reactive way, according to the Reactive Manifesto. The term "reactive" is most frequently applied to the various implementations of Reactive Extensions, pioneered by Microsoft, and appearing in many languages, usually with "Rx" prefix.
53 questions
6
votes
4
answers
3k
views
How do you honour the principle to only do "one thing" in a method in reactive streams?
Uncle Bob mentions in his book "Clean Code" that "[f]unctions should do one thing [...] only" and advocates that a method should stick to one abstraction level (I'd call it flight ...
1
vote
5
answers
359
views
Is storing computed values always bad?
Edit: I'm copying the question but changing the example code. Apparently, I used a bad example earlier that contained an imprue getter. I'm keeping the old example code at the bottom so the first ...
6
votes
3
answers
2k
views
Connotation difference between "subscribers" and "observers"
In the observer pattern, and similar, is there a meaningful difference between "subscribers" and "observers" in the wild, or in the lit? With RxJS and (functional) reactive ...
-2
votes
1
answer
136
views
System design to present live query results over realtime data
Question
What is a good storage layer, coding paradigm, and query language for computing over realtime data?
Use-case
For example, stock and options prices are (essentially) realtime data streams. I ...
1
vote
1
answer
455
views
java threading model for scale up
I need some advice on the scale-up issue. we have a java application currently it works as below
the current system is using the Thread Per Request Model.
each client connection (long-running and ...
1
vote
1
answer
771
views
DbContext lifetime in desktop app with SQLite
I am creating a small data-driven desktop application using .NET 5 with WPF, ReactiveUI, Dynamic Data, and EF Core 5. The app uses a local SQLite database to store all persisted state, and relies ...
1
vote
1
answer
512
views
How to handle nested reactive properties in reactive programming?
When building an application or program using the concepts of reactive programming, how does this work for nested reactive properties?
I have an example using Swift, ReactiveKit, and Bond, however the ...
1
vote
1
answer
788
views
What is the relationship between reactive programming and stream processing engines?
When would I use reactive programming libraries like RX Java and Project Reactor compared to stream processing engines such as Storm and Flink?
I am aware that these concepts might not be directly ...
-2
votes
1
answer
307
views
Is this OK to call a method that subscribe to IObservable multiple times? [closed]
I have this method:
private void ModerateTravel()
{
var vm = new ModerateTravelViewModel();
moderate.ShowModerateTravel(vm);
Observable.FromEventPattern<string>(h => vm.Error += ...
12
votes
3
answers
6k
views
What's the difference between reactive programming and event driven architecture?
What's the difference between reactive programming and event driven architecture?
Is reactive programming a way of implementing event driven programming?
-1
votes
1
answer
51
views
Can Ionic apps be easily ported as a Web Application?
I am newbie to angular and Ionic world and trying to figure out the right stack to get started with my requirement to develop a hybrid mobile app.
I understand that Ionic is a wrapper around other ...
0
votes
2
answers
1k
views
What is the Difference between Reactive Extensions and Message Queue?
I am trying to understand the difference between Reactive Extensions and Message Queue? Are they competing frameworks? Can they be used in conjuction? Started programming, and trying to understand ...
3
votes
3
answers
5k
views
How do non-blocking HTTP servers work?
My question is based on a few assumptions so please correct me on any of them below
I know that TCP has always been socket based
In order for a server to maintain that socket, a thread has to block ...
-1
votes
1
answer
102
views
Which programming paradigm mixes well with reactive in java? [closed]
So I have the feeling that one can forget object oriented programming when reactive streams are in use, due to the lack of the async-await syntax (because with the call chaining, the state has to be ...
0
votes
1
answer
460
views
Web turn based game Architecture. With or without websockets?
I have written a turn based game (Dominoes) using Scala and Akka actors, where a Server manage all the game state and the clients (Players) receive the new state every time one of them plays a card.
...
3
votes
0
answers
499
views
Is the concept of Rx debounce possible in a distributed environment?
The issue
I am building a server-side system that handles streams of time-series events from multiple users and I'd like to perform an action after a certain quiet period has elapsed in the event ...
-1
votes
1
answer
155
views
Reactive programming language [closed]
I had been using react-js and really like its concept so I want to know if there is a programming language/framework that sort of works like it. For instance, I want to define:
var A = something
var ...
0
votes
1
answer
891
views
When should I use Reactive web framework
When building a standard web Apis in Java world there is two ways I could do nowadays
Use SpringMVC (Not Reactive)
Use SpringWebFlux (Reactive)
There are few benefits of using Reactive that I can ...
-1
votes
1
answer
138
views
Why are ReactiveX Operators considered functional?
I'm struggling to understand how a ReactiveX operator can be considered functional.
Operators are implemented as functions, but but with the exception of simple operators like map and reduce many of ...
0
votes
1
answer
395
views
How an async response is usually getting back to the clent in typical reactive highload architecture?
A typical highload reactive architecture is:
(Q means queue)
And usually arrows are from client to DB at such sketches. My question is how the response is going back? The same queues and other stuff?...
1
vote
1
answer
419
views
MVVM distinguish between Model and View-Model and Models relashionships on reactive architecture
This should be a simple MVVM - reactive architecture question, something that I miss probably.
I'll start with a context example:
I have a Music Tracks Player application with 2 models Player and ...
2
votes
3
answers
508
views
How can I use reactive programming at multiple aggregation levels of data?
When I have a reactive stream of some composite data object, I'm never able to reap the benefits of reactive programming below the highest level of the composite. Here's an example to illustrate the ...
14
votes
2
answers
12k
views
Isn't an Entity-Component System terrible for decoupling/information hiding?
The title is intentionally hyperbolic and it may just be my inexperience with the pattern but here's my reasoning:
The "usual" or arguably straightforward way of implementing entities is by ...
1
vote
1
answer
73
views
Rx stream resulting in lots of one-off objects
My domain space is Java + RxJava but I think this applies to any reactive framework
I have a stack that looks like the diagram below. Just for examples sake I'm describing a login flow but any UI --&...
0
votes
1
answer
176
views
How do I not lose the "reactive" nature of my services, simply because one of the services isn't reactive?
I've lately been very interested in reactive microservice design with streaming and event-driven architectures.
When one writes (i.e., manages) services, this paradigm works extremely well by simply ...
2
votes
1
answer
130
views
What kind of granularity is recommended in reactive programming when publishing state change events?
I'm currently developing an application using reactive programming. Every entity creation or modification in the system publishes an event and no two entities can be created/modified within the same ...
14
votes
3
answers
909
views
Can the RxJava class Flowable legitimately have 460 methods?
I am just getting started with RxJava, Java's implementation of ReactiveX (also known as Rx and Reactive Extensions). Something that really struck me was the massive size of RxJava's Flowable class: ...
0
votes
1
answer
270
views
Reactive Programming in C# - how to roll my own?
I've been using Linq for a while unknowingly that it uses a Reactive pattern that I'm quite fond of.
I'd like to roll my own function in that pattern but wasn't sure if it's appropriate and also ...
2
votes
1
answer
262
views
How should I structure my Observables on a Nodejs application with RxJS
So I am learning reactive programming, and I am building an app for fun that listens on various stock information tickers, and calculates specific things to show in charts etc.
So right now I have ...
5
votes
1
answer
693
views
Listen for data(base) changes using Clean Architecture
Our team is building an Android app using Kotlin (if that matters at all) by following the guidelines described by Uncle Bob (Robert Martin).
The presentation pattern we use is MVI. We have ...
1
vote
1
answer
963
views
How do you update a client state with a server state in Vue or other reactive frameworks
You have a server that sends the client data. A JSON object.
{"name": "folder1", size: "2406"}
The client updates it's data:
data = newData
And the client is updated. Reactive frontend coding as ...
2
votes
1
answer
763
views
What's the system architecture of a non-SPA reactive application?
I'm starting to learn about reactive web applications, and I pretty much get the hang of the whole components, virtual DOM, states and more.
First of all, I usually don't name a technology, but for ...
1
vote
0
answers
260
views
Why are most ReactiveX implementations push-based?
Feel free to correct my history, but as far as I understand it, Rx and the Reactive Manifesto trace their roots back to C# and its Reactive Extensions, which is uses push (callback-based) messaging, ...
1
vote
1
answer
2k
views
How to avoid get/set actions in redux?
The point of redux is to decouple "what happened" from "how the state changes" according to Dan, anyway, but I'm having trouble figuring out how to handle side effects without having getters and ...
0
votes
1
answer
113
views
Functional reactive ideomatic 'OR' function
I'm would like to know your opinion of what is an ideomatic way writing a OR function in functional reactive programming.
That is, if I have x number of signals which can return a truthy or falsy ...
4
votes
2
answers
391
views
Reactive programming android app architecture
I am going to create a stock market android app. Stock quotes change every few seconds, so to keep the app updated I decided to implement a reactive functional design.
My IDEAL design would be:
...
17
votes
1
answer
2k
views
How does the Free monad and Reactive Extensions correlate?
I come from a C# background, where LINQ evolved into Rx.NET, but always had some interest in FP. After some introduction to monads and some side-projects in F#, I was ready to try and step to the next ...
6
votes
2
answers
428
views
Under what scenarios would 'functional' `Try` objects be more or less beneficial than 'rx' `Try` objects?
Definitions used by this question:
'functional' Try is what https://github.com/lambdista/try is. Success and Failure are subclasses of Try. Exceptions aren't thrown by the called function.
'rx' Try ...
5
votes
1
answer
3k
views
What are the advantages of Observables over an iterable of futures?
I recently came across the ReactiveX pattern for asynchronous data-flows. I studied the information provided there and also watched this talk by a Netflix engineer on how they used Observables to ...
10
votes
1
answer
4k
views
"Reactive programming is programming with asynchronous data streams." is this true?
I was reading about Reactive programming, and came across this article The introduction to Reactive Programming you've been missing with the quote I put in the question title:
Reactive programming ...
3
votes
1
answer
149
views
"Untriggered events" in Reactive Programming
The premise is that you have a Stream - a source of events spread over time.
You can connect to Stream and create a logical chain that will fire when a new event is emitted:
var button = document....
7
votes
1
answer
19k
views
flatMap with if else vs combine with filter
When using reactive frameworks I have seen both solutions below to make a mutually exclusive selection of which stream will be forwarded (rxjava in this case)
Observable.merge(
Observable.just(...
1
vote
0
answers
44
views
Push instead of pull on a list that might change due to a command in addition to events? [closed]
I need to show a refreshable/searchable list of items and update/add-to it whenever an event is published. How do I make sure no events are lost while refreshing/searching is happening?
Some sort of ...
2
votes
1
answer
83
views
Is it a good practice to separate lower level code from ReactiveX
Consider I have a Calculator class, it calculates an Integer. On higher parts of the system, say a MVP presenter, I want to work with an ReactiveX Observable that emits the Integer.
I could do the ...
1
vote
1
answer
774
views
Mixing reactive programming with non-reactive return requirements
Variable context from an initial non-reactive caller
The whole application cannot be reactive i.e. this method needs to return a result here
public string GetTextOfInterest()
{
var ...
0
votes
0
answers
600
views
Pushing data into chunks from server to mobile client
I am developing a windows phone application. On the first screen user enters some unique code and based on that code there are say 200 or more records on the server which I want to return to the ...
7
votes
0
answers
562
views
How can one simply follow reactive manifesto? [closed]
I am quite confused about the Reactive Manifesto. According to this manifesto a reactive system should be:
Responsive
Resilient
Elastic
Message Driven
Now for being responsive and resilient, as far ...
10
votes
2
answers
2k
views
Maintaining State without assignment
I am learning functional programming and I have trouble understanding how some particular scenarios are implemented without the use of assignment. The following simple problem pretty much sums up my ...
9
votes
1
answer
942
views
What is the relationship between "flux" and pure functional reactive programming?
Flux, as far as I understood, is a technique about dealing with the dataflow of an application unidirectionally, keeping state isolated from the rest of the program in read-only, self-contained "...
2
votes
1
answer
330
views
GUI concept for a reactive, asynchronous graphical editor
I think I could describe this problem in an abstract way, but I suppose it will be easier to understand when I describe it in a real world environment.
The Problem
Imagine a graphical editor where ...