gloo icon indicating copy to clipboard operation
gloo copied to clipboard

utility crate: Indexed DB

Open fitzgen opened this issue 5 years ago • 6 comments

Should have a utility crate for working with Indexed DB in a Rust-y, idiomatic way.

fitzgen avatar Feb 26 '19 21:02 fitzgen

It should also fully support Futures, since all the IndexedDB APIs are asynchronous.

Pauan avatar Mar 13 '19 03:03 Pauan

I think approaching with a similar high level semantics, like Dexie in JS, would probably be the key in making it actually usable. Indexed DB is tedious to use as it is, and I'm afraid of even thinking about a Rust-y future chaining for low level request, responses and error handling of IndexedDB.

prasannavl avatar Mar 16 '19 07:03 prasannavl

high level semantics

I agree that we want to get there, but I am a big fan of creating layers that go from raw -sys style bindings up to callbacks, then to futures, and finally to a high level semantics along the way. This allows folks to reuse whichever layer is appropriate if they are building an alternative style of high level API or if they need direct bindings access, etc.

fitzgen avatar Mar 18 '19 17:03 fitzgen

Absolutely in agreement. Just wanted to clarify on what layers are being set as expectations in the scope of gloo and what's built outside of it.

prasannavl avatar Mar 18 '19 18:03 prasannavl

See also the discussion happening in #27 about layers of APIs.

fitzgen avatar Mar 18 '19 19:03 fitzgen

I'm experimenting with a high level indexed db wrapper (futures based) here. Feedback is welcome. 😁

devashishdxt avatar Jan 11 '22 05:01 devashishdxt