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 ...
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, &...
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.
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 ...
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 ...
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 ...
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#.
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 ...
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 ...
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 ...
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 ...
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 ...
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." ...
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. ...
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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)
// ...
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.
...
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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
reactive × 53architecture × 8
functional-programming × 8
java × 5
c# × 5
event-programming × 4
asynchronous-programming × 4
design × 3
design-patterns × 3
object-oriented × 3
.net × 3
architectural-patterns × 3
async × 3
javascript × 2
coding-style × 2
microservices × 2
multithreading × 2
clean-code × 2
mvvm × 2
message-queue × 2
gui × 2
reactjs × 2
concepts × 2
messaging × 2
observer-pattern × 2