WebAssembly / WASI

WebAssembly System Interface
Other
4.81k stars 249 forks source link

Storage API #440

Open olanod opened 3 years ago

olanod commented 3 years ago

A filesystem API as the only means to retain state in an application can be quite limiting, specially if the host platform doesn't have the concept of a filesystem, this can result in a bunch of glue code in the host to emulate a file system and for applications that have simple storage needs it also means bundling more code to adapt to the filesystem interface.

Since WASI isn't supposed to stay as a low level POSIX-like collection of interfaces but also encourages the definition of higher level APIs that can serve specific(but still widely used) use cases, I think a simple storage API can be a great addition.
So how should said API look like? 🤷🏽 That's up for discussion! but here are some ideas and I'll be thrilled to hear some more thoughts ...

linclark commented 3 years ago

Since different use cases for storage have different requirements, WASI is likely to have multiple Storage APIs. For example, Piotr Sikora has already proposed including a KV store API as part of the work needed for HTTP proxy APIs, and others have talked about relational DBs and GraphQL. So I don't know how much we can generalize in a single issue, but I'll fill in some of the background from previous discussions here.