3 ms·
> Ultimately I’d prefer to serve every read from your device’s local storage, which is my current project. Is that for native desktop/mobile clients only or we
by choilive 2y ago
> Ultimately I’d prefer to serve every read from your device’s local storage, which is my current project.
Is that for native desktop/mobile clients only or web as well?
- jitl 2y agoAll platforms; we already cache and serve locally using SQLite (see https://www.notion.com/blog/how-we-sped-up-notion-in-the-browser-with-wasm-sqlite https://www.notion.com/blog/how-we-sped-up-notion-in-the-bro...) but the cache is built as an optimization -- loads look like `isFastDevice ? (await loadLocal(request) ?? await loadRemote(request)) : (race(loadLocal(request), loadRemote(request))` We're working on redesigning the data architecture to be more truly "local first" where every read should come from local, and falling back to the server is a rare exception. We want this to look like `await loadLocal(request) ?? await sync({ priority: request }).then(() => loadLocal(request))` (Note: for features like content that make sense offline. Some features, like user invitation and management, only make sense online)
- choilive 2y agoOh nice. I had dismissed offline/local web apps for anything decently complex for a long time because of the file system limitations. But it looks like this will finally make that practical with OPFS & WASM SQlite. Thanks for sharing.