WebAssembly / wasi-keyvalue

27 stars 10 forks source link

How to represent a read-only Key-Value store? #43

Open mpwarres opened 2 months ago

mpwarres commented 2 months ago

What would the recommended way to represent a read-only key-value store (populated from or fronting some other source) with these interfaces--have it export store but return errors from bucket.set and .delete calls? Is it worth considering having a read-only store interface, or is this use case too niche to warrant a separate interface?

Mossaka commented 1 month ago

What will be the use cases for read-only key-value stores? Will wasi:runtime-config solve these use cases, which is a simply interface that provides read-only operations.

thomastaylor312 commented 1 month ago

Yeah I'm definitely curious on the use case here. With the current interface, since it returns errors, you could create an implementation that returns an error on write ops. But I also understand you may want to have the interface indicate the difference