Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comparing to RX.NET #33

Open
luxl opened this issue Dec 23, 2023 · 2 comments
Open

comparing to RX.NET #33

luxl opened this issue Dec 23, 2023 · 2 comments
Labels
question Further information is requested

Comments

@luxl
Copy link

luxl commented Dec 23, 2023

feels like with reactive programming, is there any advantages over it?

@timonkrebs timonkrebs added the question Further information is requested label Dec 23, 2023
@timonkrebs
Copy link
Owner

timonkrebs commented Dec 23, 2023

At the Moment:

If you have a reactivity graph you will eventally run into things like the Diamond Problem. These Problems are solved out of the box in MemoizR (Signal implementations in general) where as with all the ReactiveX implementations these problems are not trivial to solve.

MemoizR is built with async in mind from the start, RX.Net only added AsyncRx recently and it is not production ready as of now. Rx.Net preceeds async await and therefore is not optimized for the modern way of writing C#.

There are a lot more advantages, like automatic/no subscription handling and all the problems that get solved from that.

But the biggest advantages over RX.Net in my opinion are probably not quite objective. I think the code that results from using MemoizR is easier to read/maintain because it is a lot closer to the traditional structured programming concepts used in modern C#.

In the frontend space Signals seem to win over rxjs. But MemoizR is a lot more than just a Signal implementation. It adds Declarative Structured Concurrency and Signal Operators which make it a lot more comparable to ReactiveX than the Signal implementations we see in the FE space.

Evolution of Signals

With MemoizR you can start simple and add complexity only as you need it. And a lot of the complexities are handeled out of the box. In conclusion: There are a lot less foot guns on the way compared to RX.Net

@timonkrebs
Copy link
Owner

timonkrebs commented Dec 23, 2023

Big advantages come from features that will be possible to implement with MemoizR that do not fit into the ReactiveX model.

For example:

  • Structured Concurrency enables much more control over cancellation and scheduling over ReactiveX. This enabels back-pressure strategies not present in ReactiveX backpressure operators
  • In MemoizR there is a concept of current state per node. Which is a lot more deterministic than with ReactiveX. This will enable working in a distributed graph with MemoizR that is not possible with RX.Net
  • Serializing the dependency graph in ReactiveX is not really possible, whereas with MemoizR it is straight forward. This enables features that will not be possible with RX.Net. (eg. Enabels Resumability)
  • And more

@timonkrebs timonkrebs pinned this issue Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants