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

Dralbase state managment #710

Merged
merged 70 commits into from
Dec 29, 2020
Merged

Dralbase state managment #710

merged 70 commits into from
Dec 29, 2020

Conversation

dralletje
Copy link
Collaborator

@dralletje dralletje commented Nov 25, 2020

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.

@fonsp fonsp changed the title Firebase like state managment Dralbase state managment Nov 25, 2020
@fonsp fonsp linked an issue Nov 29, 2020 that may be closed by this pull request
@fonsp
Copy link
Owner

fonsp commented Dec 20, 2020

VET

Schermopname 2020-12-20 om 23 27 44

@fonsp

This comment has been minimized.

@pankgeorg

This comment has been minimized.

Παναγιώτης Γεωργακόπουλος and others added 4 commits December 29, 2020 18:48
* 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>
@fonsp
Copy link
Owner

fonsp commented Dec 29, 2020

@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!

@fonsp fonsp marked this pull request as ready for review December 29, 2020 22:00
@fonsp fonsp merged commit dff84f0 into master Dec 29, 2020
This was referenced Dec 30, 2020
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)
@fonsp fonsp deleted the firebase-like-state-managment branch March 10, 2021 10:40
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

Successfully merging this pull request may close these issues.

3 participants