Replying to Avatar hzrd149

Added support for nostr:npub1v0lxxxxutpvrelsksy8cdhgfux9l6a42hsj2qzquu2zk7vc9qnkszrqj49's @snort/worker-relay package in #noStrudel, it runs a SQLite using WASM in a web worker 😀

Its not quite as fast as using the Indexeddb api but it doesn't make the browse freeze up as much. I have not tested it on mobile so I have no idea how well it will work.

You can find the package here https://git.v0l.io/Kieran/snort/src/branch/main/packages/worker-relay

And if your reading this nostr:npub1v0lxxxxutpvrelsksy8cdhgfux9l6a42hsj2qzquu2zk7vc9qnkszrqj49 there are a few improvements id like to see

- a way to delete specific events (base on a REQ filter) from the database

- a method for deleting the database out right

- the ability to stop the web worker and close the database

Right now there is no way to "manage" the database so it just keeps growing in size 😞

Changes are only on next.nostrudel.ninja for testing

It looks like @nostr-relay/event-repository-sqlite could be helpful for you. It's the database implementation used by nostr-relay-tray. It allows for inserting events and finding events by a filter, and nostr:npub1rw7hlhmgat6ur9zxcw40vweem49guv6530yk767j8xjpynv0y20q6qsl3w is currently developing the filter deletion functionality. However, it's unclear if it can be directly used in a browser.🤣 Perhaps with some minor modifications, it could be made compatible.

Reply to this note

Please Login to reply.

Discussion

No replies yet.