Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Considering switch Observables.jl to Rocket.jl? #4448

Closed
XLin0mu opened this issue Oct 4, 2024 · 1 comment
Closed

Considering switch Observables.jl to Rocket.jl? #4448

XLin0mu opened this issue Oct 4, 2024 · 1 comment
Labels
enhancement Feature requests and enhancements

Comments

@XLin0mu
Copy link

XLin0mu commented Oct 4, 2024

Observables.jl works a bit of slow for high frequence tasks, while Rocket.jl works better than Observables.jl on both time and memory cost(and other reactive packages).

Also, Rocket.jl have more up-to-date maintenance, while Observables.jl has been almost a year without an update and has not yet released its 1.0 version.

On the other hand, the documentation and API of Rocket.jl are also more comprehensive than those of Observables.jl.

Reposity of Rocket.jl:
https://github.com/ReactiveBayes/Rocket.jl

@XLin0mu XLin0mu added the enhancement Feature requests and enhancements label Oct 4, 2024
@SimonDanisch
Copy link
Member

I think combining Rocket and Makie could be interesting, but I dont see it replacing observables in the foreseeable future.
We actually plan right now to remove Observables from Makie's internals and use a very lightweight, plot specific way to pass events from the user to the backend: #4360. This will make it less important what "observable" framework you use to update Makie plots.

There are several reasons why I won't consider Rocket right now for Makie's internals:

  • Every time I look at the docs, I come back confused. This is likely because I'm not used to the actor principle and haven't given it enough time to learn it. So not a strong reason, but certainly doesn't help.
  • Correct me if I'm wrong, but that Rocket is more performant must be a trade off. The main performance culprit for Observables is, that we had to use invoke_latest, since we had several serious bugs without it because user callbacks would call into the wrong world age. If Rocket doesn't use invoke_latest, it's either more complicated to define safe callbacks for it, or it will need a lot more compile time. ~20-30% of compile time comes from Observables already, so a framework being even harder on the compiler is currently hard to justify. If it's a secret third option, I'd be happy to learn from it.
  • It took several weeks to go from React.jl to Observables.jl, which wasn't a fun refactor and someone needs to pay for it/put the work in. Rocket.jl is much more different from Observables.jl than React.jl from Observables.jl, so I expect it to be an even harder refactor, which will need a much better justification in favor of Rocket.jl than "it may be faster in a few specific tasks".

However, what we could start with is looking at writing tutorials and maybe add lightweight APIs for how to best use Makie & Rocket together. E.g. a simple way to hook up a rocket signal to update plot attributes.
I'm happy to answer questions about it, but don't have time to write such tutorials/integrations.

@MakieOrg MakieOrg locked and limited conversation to collaborators Oct 4, 2024
@SimonDanisch SimonDanisch converted this issue into discussion #4449 Oct 4, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement Feature requests and enhancements
Projects
None yet
Development

No branches or pull requests

2 participants