-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
Dralbase state managment #710
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
…nsp/Pluto.jl into firebase-like-state-managment
This comment has been minimized.
This comment has been minimized.
* Fix front-end tests Content in front-end changes multiple times, as patches are sent to the backend. It's not reliable to wait for the first change, which is sometimes an undefined error (@dralletje??!!) so we wait until the result stabilizes to the value we expect. To the user that's transparent (hopefully). We've also added a counter to keep track of pending backend requests, and add a class to the document.body (that doesn't do anything else). * Update Editor.js Co-authored-by: Fons van der Plas <fonsvdplas@gmail.com>
…nsp/Pluto.jl into firebase-like-state-managment
@dralletje I have merged this PR to get my mind cleared but we still need to do the testing and documentation that I listed here before we tag the next release. Thankyou! |
This was referenced Dec 30, 2020
Closed
pankgeorg
pushed a commit
that referenced
this pull request
Jan 28, 2021
[Diff since v0.12.18](v0.12.18...v0.12.19) **Closed issues:** - GPU usage and console messages (#685) - Feature Proposal: Exported HTML can be passed to a static site generator (#794) - wait and resume execution on button press (#803) - Latex code not appropriately displayed (#817) - Python doesn't work in Pluto (#818) - add pluto - pluto not found - Julia 1.5.3 macOS (#819) - Cell output not shown correctly if in-line comment ends with semicolon (#820) - _llvm (#821) - Can't move cells (#822) - Conditions on list comprehensions and execution order (#824) - Electron app (#825) - Errors when pressing Ctrl+C to stop Pluto (#827) - Failed to load notebook error (#829) - Popup docs don't work for some symbols (#832) - Running a notebook deleted contents of `.julia/registries` (#834) - Ctrl+C broken with `julia -e "Pluto.run()"` instead of the REPL (#836) - Edit or remove default header and footer in exported static PDF (#837) - Parameters.jl dynamically created macros confuse Pluto (#838) - Feature request: Open URL from terminal (#840) - Notebook gets stuck in forever loading state after restarting my PC while running it (#849) - Syntax highlighting of @. (#854) - File not found when file newly created while session is running (#855) - Weird output from a mix of MathJax, Markdown and PlutoUI (#856) - Misaligned plots when plotting with UnicodePlots.jl using BrailleCanvas (#870) **Merged pull requests:** - Pluto ux process file drop (#707) (@pankgeorg) - Dralbase state managment (#710) (@dralletje) - PLJ-785 CodeMirror Eject to TextArea - Reload from TextArea in Offline HTML export (#805) (@pankgeorg) - Dralbase state managment: Fix front-end tests (#809) (@pankgeorg) - Update README.md (#814) (@fonsp) - Regard `:=` in macros as einsum notation (take 2) (#816) (@mcabbott) - 🧸 Open your own files as samples (#828) (@fonsp) - Handle filters in generators, closes #824 (#839) (@Pangoraw) - Update `== nothing` to `=== nothing` in Parse.jl (#841) (@heetbeet)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A rewrite of Pluto's internal state management that makes it work more like Google Firebase:
All clients and the server all have a local, mutable copy of the global shared state. Anyone can mutate their local state, get local effects instantly, and everything will be updated in the background.
Client
The main advantage is that actions like 'add cell', 'delete cell' will have instant effect on the local, visual state. This would get rid of the small delay or these actions, caused by a round trip of information.
Server
The server can be written in a more declarative style. Instead of manually handling each message (e.g. 'add_cell', 'delete_cell') with specialized code (example), there is only one function:
do_effects(old_notebook_state, new_notebook_state)
. When the server updates a cell output, it does just that, and Dralbase will figure out how to send this to the clients efficiently.