A1Liu / webb

WIP Local-first App Framework
MIT License
0 stars 0 forks source link

Reactivity Model #22

Closed A1Liu closed 9 months ago

A1Liu commented 11 months ago

Tauri events: https://tauri.app/v1/guides/features/events/

A1Liu commented 11 months ago

Options

Implement GC and tracking manually

use IDs to track reference lifetimes, and do our own garbage collection

Implement GC implicitly using Arc

~Runs keep Arc to their inputs, stream results as needed~

Final decision

Need to use RunGraph instead of CellGraph so that there's no race conditions which produce implicit cycles Also probably need a version ID on the generation counter

A1Liu commented 11 months ago

Maybe instead of having super complicated threading model, use ideas from tick system in S.js to serialize dependency graph production

A1Liu commented 11 months ago

petgraph::GraphMap - https://github.com/petgraph/petgraph

A1Liu commented 10 months ago

Use start() -> RunResult to synchronously create graph w/ initial dependencies mapped out

A1Liu commented 10 months ago

Plan:

  1. Set up buffering using files instead of in-memory stuff (notify crate or tail -f -c +1 FILE)
  2. Run polling for cells instead of runners
  3. Stdin
  4. Dependency Graph