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

Sys - All instances share the same state #61

Closed
adrian-moisa opened this issue Jun 27, 2022 · 1 comment
Closed

Sys - All instances share the same state #61

adrian-moisa opened this issue Jun 27, 2022 · 1 comment
Assignees

Comments

@adrian-moisa
Copy link
Collaborator

Due to the current migration we have a major issue around. All the running instances share the same states due to the singleton pattern. We need to find a solution such that each instance gets a unique state classes.

@adrian-moisa
Copy link
Collaborator Author

adrian-moisa commented Jul 3, 2022

After a major overhaul of the code that manages the state store I've been able to setup one store per controller instance. Now it is possible to run 2 instances of Visual Editor in parallel. I've written a full document explaining how the state store works and how to extend it. Notice that it is a custom internal solution (pure dart and streams) but it applies all the principles of unidirectional, pure data, global state store architecture (such as redux/ngrx). Some amount of prop drilling was reintroduced but far less pervasive compared to the old architecture, and most importantly, a lot easier to trace. As long as you know the rules of the state store you wont have any issues fixing or extending it.

29 Finally running

@adrian-moisa adrian-moisa changed the title All instances share the same state Sys - All instances share the same state Nov 5, 2022
@adrian-moisa adrian-moisa added MVP and removed Critical labels Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant