When has JavaScript ever been better?! ๐Ÿ˜‚๐Ÿ˜‚ kidding, sort of. Iโ€™m sure we can get a lot more out of the dexie (indexedDB) cache adapter. Just tough to find the time.

Replies (3)

nostrdb has some other crazy optimizations like multithreaded ingester that will find the ID and check for its existence in the DB before continuing json parsing and checking signatures. So some web nostr db could steal those.
Water Blower's avatar
Water Blower 2 years ago
IndexedDB is slow as hell. Chrome implemented IndexedDB on top of LevelDB and Firefox on top of SQLite. Almost all fast-enough web clients cache events in JS memory instead of query from IndexedDB on every read. This is also why I intentionally do not implement storage layer for nostr.ts. Browser is not designed for local-first, client driven applications. If you implement NostrDB on top of IndexedDB, you effectively implemented it on top of SQLite/LevelDB which is exactly what you planned to avoid at the first place.
Water Blower's avatar
Water Blower 2 years ago
I am exploring Tauri, it's like a better Electron. The native process is Rust instead of NodeJS. Maybe we can have 80% of the features in Browser and the user can choose to download a native app for the rest 20%. But this approach basically says goodbye to PWA mobile. Mobile is just too different. An attempt to cross-platform mobile is very hard.
โ†‘