Re: [w3ctag/design-reviews] Async local storage (#278)

In general, we are quite happy with this API. In particular, this has great "layering"--not adding new magic, which is good. Also, this feature gets exposed through the new module import mechanism which is cool--first feature to be released into the platform that's not available by default in the global realm.

Some other feedback:

* This API piggy-backs on IndexedDB. It uses a particular string name to register itself: we think it would be a good idea to reserve some kind of prefix/namespace to avoid author code stomping on potential future Layered APIs. It's not something that can be enforced by the API obviously, but we think coming up with something and making that an author note would be helpful and not hurtful. (There may also be optimizations possible in implementation if a known prefix is used, or so I'm told.)

* Getting the list of keys, values, etc., could impact memory footprint in the case of many keys/values. For the future, it would be nice to extend the API to support async iterators (when they become available).


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/278#issuecomment-434728909

Received on Wednesday, 31 October 2018 15:26:46 UTC