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

Plugin storage improvements #827

Open
James-Mart opened this issue Sep 3, 2024 · 0 comments
Open

Plugin storage improvements #827

James-Mart opened this issue Sep 3, 2024 · 0 comments
Assignees
Labels
Plugin Infra Related to the infrastructure used by front-end app or plugin developers
Milestone

Comments

@James-Mart
Copy link
Member

James-Mart commented Sep 3, 2024

There are various improvements that can be made to plugin storage.

As mentioned in the PR that delivered the MVP:

  • Currently a known bug in the implementation of list-keys, so it is currently commented out and unavailable everywhere.
  • The increment function is supposed to be atomic, but it is not. It currently just outputs a warning that it is non-atomic.

As well as fixing both of the above issues, the following are also important:

  • Back pluginstorage with an IndexedDB API rather than LocalStorage. Currently plugin storage has the (massive) limitation that it can store a maximum of 5MB, whereas IndexedDB will give us essentially arbitrarily large storage capacity. The problem is that IndexedDB is exclusively an async interface, and therefore it would be easiest to wait until JSPI is supported in modern browsers to use it.
  • Come up with a strategy for plugin storage writes to be dependent on the successful execution of the scheduled transaction. This way client storage remains consistent by following forks.
@James-Mart James-Mart added the Plugin Infra Related to the infrastructure used by front-end app or plugin developers label Sep 3, 2024
@James-Mart James-Mart added this to the R3 milestone Sep 3, 2024
@James-Mart James-Mart self-assigned this Sep 3, 2024
@James-Mart James-Mart moved this to In Progress in Psibase Sep 3, 2024
@James-Mart James-Mart moved this from In Progress to Todo in Psibase Sep 3, 2024
@James-Mart James-Mart removed the status in Psibase Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plugin Infra Related to the infrastructure used by front-end app or plugin developers
Projects
Status: No status
Development

No branches or pull requests

1 participant