-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Implement wasi-keyvalue #8983
Implement wasi-keyvalue #8983
Conversation
f32c13b
to
91a4566
Compare
Would it make sense to have a local storage method too? That would allow quick tests without requiring the setup of an entire database. |
Sure, I'll implement an in-memory backend and make the other database backends optional. |
I will fix the dead-code warning, but I have no idea why the runtime_config_get test failed:
|
I have figured it out (#8997) and made a temporary solution by adding the [features]
# Do not use, this is only used for testing in CI,
# see https://github.com/bytecodealliance/wasmtime/issues/8997
test = ["wasmtime/wmemcheck"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking quite good to me, thanks for the PR and the work here! The biggest question below I have is about how buckets are opened.
All comments addressed ec3373a, PTAL |
dc2f2a3
to
b9d2bd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks! I'll queue for merge after a rebase makes CI happy
(thanks for helping to debug CI and fix the issue!)
Hi @alexcrichton, CI is happy now except |
Hey there! wasi-keyvalue champion here. So I don't think any of the champions knew this was landing. I'm super excited someone implemented it here (thanks @iawia002)! However, we are in the process of incorporating a last round of feedback now that we've had people implementing against it: WebAssembly/wasi-keyvalue#46. We might want to hold off on releasing this until we can make those changes and go to a full 0.2.0 release of wasi-keyvalue. Also, an in memory KV store makes sense to me, but I don't think we want to take hard deps on other KV stores in something like wasmtime. This was something that we had loosely talked about as being "host plugins" using something like wRPC |
Hi @thomastaylor312, basically, when a proposal enters Phase 2, we can start implementing it. If we wait for it to be completely ready before we begin, the timeline would become excessively long. Therefore, we also have corresponding implementations for draft versions of proposals, allowing users to start experimenting with the API. For the Line 61 in ba864e9
Regarding the release issue, strictly speaking, this has not yet been landed. According to the wasmtime release schedule, the code will be frozen on the 5th and will not be released until the 20th of this month. So we still have time to follow up on the latest changes in the Overall, I think we can go ahead and release this, allowing users of wasmtime v24 to try out the
I agree with this, there are too many KV storage solutions. But I'm not sure if we should move all KV storage implementations out of wasmtime, because depending on Redis/etcd/Memcached, etc., does not affect |
Yeah we chatted about this today in the wasmtime meeting. So I think we are ok with the current pinned tag, especially since things are behind a feature flag. However, I still think keeping Redis in tree is a bad idea. The reason why even the super popular ones should be a plugin type model is that now any time the redis client has a bug, you have to update the keyvalue crate and the CLI just to get the bug fix. I know this could happen with any crate, but with client APIs, these kinds of fixes happen quite often. If it happens to be security sensitive, it would necessitate a release of the crate and CLI for anyone depending on it. This wouldn't happen if this was done by loading a plugin separately |
I have now seen the meeting notes. I apologize for any inconvenience caused by not notifying you during the implementation. I will submit a PR to revert the introduction of Redis. |
No problem! I just wanted to make sure we had our ducks in a row here as we move forward adding new interfaces |
The wasi-keyvalue API has entered Phase 2. This patch implements the API, giving wasm components access to key-value storages.
Currently, only the Redis storage backend has been implemented, and support for more kv storage (e.g. etcd, etc.) will be added in the future.
cc @alexcrichton