Skip to main content

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.

Filter by
Sorted by
Tagged with
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 ...
Christian's user avatar
  • 171
1 vote
5 answers
338 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 ...
sharbel okzan's user avatar
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 ...
Alexander Mills's user avatar
-2 votes
1 answer
92 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 ...
geofflittle's user avatar
1 vote
1 answer
408 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 ...
london tom's user avatar
1 vote
1 answer
701 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 ...
wired_in's user avatar
  • 332
1 vote
1 answer
433 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 ...
Charlie Fish's user avatar
1 vote
1 answer
710 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 ...
Hyggenbodden's user avatar
-2 votes
1 answer
287 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 += ...
SIRS's user avatar
  • 281
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?
mohsenJsh's user avatar
  • 1,315
-1 votes
1 answer
48 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 ...
Vishal Kumar's user avatar
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 ...
DerrikRodgers's user avatar
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 ...
BGRT's user avatar
  • 49
-1 votes
1 answer
95 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 ...
zeller's user avatar
  • 161
0 votes
1 answer
428 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. ...
Cheluis's user avatar
  • 119
3 votes
0 answers
477 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 ...
noamt's user avatar
  • 139
-1 votes
1 answer
148 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 ...
letFunny's user avatar
0 votes
1 answer
856 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 ...
tabiul's user avatar
  • 109
-1 votes
1 answer
130 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 ...
Brian Flynn's user avatar
0 votes
1 answer
390 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?...
arminvanbuuren's user avatar
1 vote
1 answer
405 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 ...
Dima Gimburg's user avatar
2 votes
3 answers
463 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 ...
JounceCracklePop's user avatar
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 ...
PawkyPenguin's user avatar
1 vote
1 answer
69 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 --&...
tir38's user avatar
  • 203
0 votes
1 answer
173 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 ...
erip's user avatar
  • 241
2 votes
1 answer
123 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 ...
Kilian's user avatar
  • 131
14 votes
3 answers
893 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: ...
skomisa's user avatar
  • 251
0 votes
1 answer
265 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 ...
meds's user avatar
  • 149
2 votes
1 answer
247 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 ...
Alfonso Embid-Desmet's user avatar
5 votes
1 answer
673 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 ...
curiousily's user avatar
1 vote
1 answer
929 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 ...
user974407's user avatar
2 votes
1 answer
748 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 ...
Christopher Francisco's user avatar
1 vote
0 answers
259 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, ...
concat's user avatar
  • 517
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 ...
drewwyatt's user avatar
  • 297
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 ...
Erik Johansson's user avatar
4 votes
2 answers
385 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: ...
Javier Ventajas Hernández's user avatar
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 ...
MLProgrammer-CiM's user avatar
6 votes
2 answers
418 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 ...
Noel Yap's user avatar
  • 171
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 ...
gardenhead's user avatar
  • 4,747
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 ...
m0meni's user avatar
  • 793
3 votes
1 answer
145 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....
ZenMaster's user avatar
  • 133
7 votes
1 answer
18k 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(...
Erik Johansson's user avatar
1 vote
0 answers
43 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 ...
Den's user avatar
  • 4,847
2 votes
1 answer
80 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 ...
fweigl's user avatar
  • 195
1 vote
1 answer
751 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 ...
Cel's user avatar
  • 145
0 votes
0 answers
595 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 ...
MegaMind's user avatar
  • 175
7 votes
0 answers
559 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 ...
Sarp Kaya's user avatar
  • 341
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 ...
Jencel's user avatar
  • 217
9 votes
1 answer
933 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 "...
MaiaVictor's user avatar
  • 5,830
2 votes
1 answer
329 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 ...
twilker's user avatar
  • 908