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

Support wasi-keyvalue #2447

Open
endocrimes opened this issue Apr 11, 2024 · 9 comments · May be fixed by #2486
Open

Support wasi-keyvalue #2447

endocrimes opened this issue Apr 11, 2024 · 9 comments · May be fixed by #2486
Assignees
Labels
enhancement New feature or request

Comments

@endocrimes
Copy link
Member

endocrimes commented Apr 11, 2024

wasi-keyvalue is relatively complete as an interface and the core interface (https://github.com/WebAssembly/wasi-keyvalue/blob/main/wit/store.wit) is almost identical to spin-kv (https://github.com/fermyon/spin/blob/main/wit/key-value.wit) with the primary difference being the exists function.

We should add support for wasi-keyvalue to get broader ecosystem compatibility - and the ability to benefit from the extended interfaces over time.

@endocrimes endocrimes added the enhancement New feature or request label Apr 11, 2024
@itowlson itowlson linked a pull request May 3, 2024 that will close this issue
@itowlson
Copy link
Contributor

itowlson commented May 3, 2024

@endocrimes Can you expand on the difference you identified around the exists function please? They look the same to me but I'm not terribly au fait with the wasi-keyvalue side.

(The main difference I did run into was around list-keys accepting a cursor for paging.)

@endocrimes
Copy link
Member Author

Past me forgot to link to a revision, but that got added since I last looked 😅 - now there's no meaningful difference 🎉

@itowlson itowlson linked a pull request May 6, 2024 that will close this issue
@itowlson itowlson self-assigned this May 6, 2024
@mikkelhegn
Copy link
Member

@itowlson - We talked about this in today's Spin Up meeting. There is a release going out early next week. If there is an opporutnity to get this in, it's possible. If not, we can move it to post release in the board.

@itowlson
Copy link
Contributor

@mikkelhegn There is a PR out. The first step towards a release would be to get feedback on that, specifically on the critical question of how to manage the Spin world versioning. I'll ping the reviewers.

@lann
Copy link
Collaborator

lann commented Jun 11, 2024

the critical question of how to manage the Spin world versioning

Notably, this is basically the entire focus of WASI 0.2.1 and afaik we still haven't even completely figured out versioning for that upstream.

@itowlson
Copy link
Contributor

@mikkelhegn given ^^ I think it is fair to say this will not be part of 2.6

@devigned
Copy link
Contributor

Hey folks 👋, I'm happy to volunteer to implement the rest of the WASI key/value interface (atomics and batching) to help provide the basis for a second provider implementation for the interfaces, which will enable it to graduate to phase 3. Would the project be interested in the contribution?

@itowlson
Copy link
Contributor

@devigned The project would be absolutely delighted - thank you! I've just rebased #2486 onto latest main - I don't know whether it's more convenient for you to PR onto that or to take a new branch from it and create a new PR - whatever suits you.

As you're aware, #2486 only covers the store interface, because that is what we already had code for. The batch and atomics interfaces would require wholly new code, which I expect would be routine API calls for the Redis and Azure backing stores, but we also have a SQLite store for local dev use. I expect batch would be easy to implement on that; atomics might involve a bit more faff. I'm happy to collaborate if need be of course! And apologies if I'm telling you things you already know.

Thanks again!

@devigned
Copy link
Contributor

My plan is to make a new branch from yours and create a new PR. I don't want to muddy your existing work while I fiddle.

As you're aware, #2486 only covers the store interface

Yes. I talked with @kate-goldenring about each of the impls. I believe I should be able to implement the rest of the interface over the data stores. The SQLite store may need a schema change, but I don't think it should be too bad. It'll be a great opportunity to test that the k/v interface will work well with multiple data stores.

I really appreciate your support and will likely take you up on the offer to collaborate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants