Skip to main content
26 votes
Accepted

Isn't an Entity-Component System terrible for decoupling/information hiding?

ECS completely ruins data hiding. This is a trade-off of the pattern. ECS is excellent at decoupling. A good ECS lets a move system declare that it works on any entity that has a velocity and a ...
Sebastian Redl's user avatar
20 votes

How do you honour the principle to only do "one thing" in a method in reactive streams?

What you're asking how to do is called decomposing. "Do one thing" never meant your function couldn't be decomposed into more things. Every function can be decomposed into more things. No, &...
candied_orange's user avatar
17 votes

How do you honour the principle to only do "one thing" in a method in reactive streams?

“Do only one thing” may include “do everything to display the user’s information on the screen and allow editing it”. Taking SRP too literal is a recipe for disaster.
gnasher729's user avatar
  • 49.4k
14 votes
Accepted

Can the RxJava class Flowable legitimately have 460 methods?

TL;DL The lack of language features of Java compared to C# as well as discoverability considerations made us put source and intermediate operators into large classes. Design The original Rx.NET was ...
akarnokd's user avatar
  • 256
12 votes
Accepted

Connotation difference between "subscribers" and "observers"

Nearly all words used in programming are plain English terms that still retain all of their original semantics (or as much of it as applies to programming), since their purpose is to help English ...
Ben Cottrell's user avatar
  • 12.1k
10 votes

Can the RxJava class Flowable legitimately have 460 methods?

While I'll admit I'm not familiar with the library, I took a look at the Flowable class in question and it seems like it's acting like a hub of sorts. In other words, it is a class meant to validate ...
Neil's user avatar
  • 22.9k
10 votes
Accepted

Reactive Programming in C# - how to roll my own?

That is not reactive programming. Reactive programming is something entirely different. What you have is called fluent interface. And it is quite trivial to implement in C#.
Euphoric's user avatar
  • 38.2k
10 votes
Accepted

How do you honour the principle to only do "one thing" in a method in reactive streams?

In general, do not follow any principles suggested without a rationale (and Uncle Bob is not rational). To follow the principle blindly, you can introduce a layer of abstraction - a dispatcher. It ...
Basilevs's user avatar
  • 4,484
9 votes
Accepted

How do non-blocking HTTP servers work?

Think select() In order for a server to maintain that socket, a thread has to block and wait for IO on the server side That's not true. The operating system can, and does, manage the network ...
whatsisname's user avatar
  • 27.7k
7 votes

Isn't an Entity-Component System terrible for decoupling/information hiding?

There is almost no way get around the fact that a system needs to access multiple components. In order for something like a VelocitySystem to work, it would probably need access to a VelocityComponent ...
Athos vk's user avatar
  • 430
7 votes

How does the Free monad and Reactive Extensions correlate?

Monads A monad consists of An endofunctor. In our software engineering world, we can say this corresponds to a datatype with a single, unrestricted type parameter. In C#, this would be something of ...
Nathan Davis's user avatar
7 votes

Can the RxJava class Flowable legitimately have 460 methods?

.NET's RX's equivalent to Flowable is Observable. It also has all of those methods, but they are static and usable as extension methods. The main point of RX is that the composition is written using ...
Euphoric's user avatar
  • 38.2k
7 votes

Connotation difference between "subscribers" and "observers"

The terms are mostly interchangeable, but there are subtle differences in specific implementations. For example, a Monix Subscriber is described as "an Observer with an attached Scheduler." ...
Karl Bielefeldt's user avatar
5 votes

What's the difference between reactive programming and event driven architecture?

Event-driven architecture (EDA) is an architectural pattern that promotes the production, detection, consumption of, and reaction to events. They are usually broadcasted through notification messages. ...
Denis FB's user avatar
  • 209
4 votes

What's the difference between reactive programming and event driven architecture?

Reactive Programming A number of people have identified an increasing importance of a certain combination of desired properties for a certain kind of modern large-scale software systems. In concert, ...
Hyggenbodden's user avatar
4 votes

How do you honour the principle to only do "one thing" in a method in reactive streams?

This is one abstraction level (pseudocode). The "one thing" it does is sequence step1 and step2. stream .groupBy(step1) .map(step2) This is multiple abstraction levels. It is doing both ...
Karl Bielefeldt's user avatar
3 votes

What's the difference between reactive programming and event driven architecture?

Reactive programming - at an abstract level - deals with decoupling flows using asynchronous data streams. However, pretty much the industry standard for achieving asynchronous data streams is ...
skott's user avatar
  • 509
3 votes
Accepted

How do I not lose the "reactive" nature of my services, simply because one of the services isn't reactive?

Guess it's a bit late but here is what I would do : I would put a wrapper around your part and the blackbox. This wrapper will handle the creation of the jobs and the pulling. You have to make it qo ...
Walfrat's user avatar
  • 3,536
3 votes

Is storing computed values always bad?

"age" is of course not just a computed value. It is a computed value that is (very slightly) different on each call, so you really really don't want to store the value. Except if a ...
gnasher729's user avatar
  • 49.4k
3 votes

Is storing computed values always bad?

To make a true apples-to-apples comparison, modify the first version to make it semantically equivalent to the second, i.e. the class should encapsulate the calculation and not allow any outside to ...
Sebastian Redl's user avatar
2 votes
Accepted

What kind of granularity is recommended in reactive programming when publishing state change events?

In principle, I think what's most convenient for your event handlers should be a secondary concern. One of the major advantages of events is that the event source does not need to know anything about ...
doubleYou's user avatar
  • 2,867
2 votes

Listen for data(base) changes using Clean Architecture

I've seen many implementations that use RxJava deep into their business logic. Well, isn't that just wrong? It certainly doesn't follow Clean Architecture recommendations. The DB is a plugin. A DB ...
candied_orange's user avatar
2 votes
Accepted

Why are ReactiveX Operators considered functional?

Firstly the pedantic argument... You ask how buffer, as an example, could be considered functional, but then go on to talk, not about the buffer function itself, but the onNext and subscribe functions ...
Daniel T.'s user avatar
  • 3,073
2 votes
Accepted

How an async response is usually getting back to the clent in typical reactive highload architecture?

In a system based on asynchronous messages (events), there is no concept of a synchronous “response”. However, some events might be related. Many message queues allow a message/event to have a ...
amon's user avatar
  • 136k
2 votes

Reactive programming language

The easy solution in nearly every programming language is to make that dependent value B a function. Instead of accessing the variable, you would call the function: var B = () => somefun(A) // ...
amon's user avatar
  • 136k
2 votes

Which programming paradigm mixes well with reactive in java?

I would say the closest "Paradigm equivalent" is Functional Programming, perhaps even lazy functional programming (or FP that is lazily evaluated). It's obviously not an exact mapping, but it's close. ...
Alex Hart's user avatar
  • 191
2 votes

Is this OK to call a method that subscribe to IObservable multiple times?

Just try it and see if your callback is called once or twice when you call it twice. I mean if someone says “yes, it’s ok”, would you just believe it without verifying? And when you verify it, there’s ...
gnasher729's user avatar
  • 49.4k
2 votes

How can I use reactive programming at multiple aggregation levels of data?

In both your examples, FancyControl is having values pushed into it, rather than have FancyControl reacting to values that it has requested. Most discussions of reactive approaches to wiring things ...
BobDalgleish's user avatar
  • 4,749
2 votes

Connotation difference between "subscribers" and "observers"

In Rx speak an Observer is something that can get notifications from a data source and a Subscriber is an observer that can also unsubscribe from that source. Subscriber - Implements the Observer ...
Benjamin Gruenbaum's user avatar
2 votes
Accepted

Is storing computed values always bad?

The guiding principal here is DRY (don't repeat yourself) during object construction. The second case doesn't require anyone constructing the object to repeat the calculation savings - debt. If the ...
DavidT's user avatar
  • 4,629

Only top scored, non community-wiki answers of a minimum length are eligible