Skip to content

Commit

Permalink
model: maintain speculative and confirmed state
Browse files Browse the repository at this point in the history
Speculative state is computed eagerly by optimistically applying the
expected events returned from mutations when they are executed.

Confirmed state is computed from change events consumed from the backend
via the model's input streams.

Implements logic to rebase speculative updates on top of confirmed state
as events arrive.
  • Loading branch information
mschristensen committed Jun 22, 2023
1 parent d6c9675 commit a4ad1ff
Show file tree
Hide file tree
Showing 5 changed files with 493 additions and 86 deletions.
36 changes: 29 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
"vitest": "^0.29.8"
},
"dependencies": {
"ably": "^1.2.39",
"@types/lodash": "^4.14.195",
"ably": "^1.2.40",
"lodash": "^4.17.21",
"rxjs": "^7.8.1"
}
}
Loading

0 comments on commit a4ad1ff

Please sign in to comment.