It’s still VERY early stages. But that is one of the concepts of my #nostr relay. You can currently use in memory, file system, or SQLite. On my radar to add Postgres and remote relays, and hopefully more. https://github.com/rrainn/nostr-relay

Reply to this note

Please Login to reply.

Discussion

Sweet. It's very similar to what I'm doing. I have in-memory and SQLite implemented here: https://gitlab.com/soapbox-pub/ditto/-/tree/main/src/storages?ref_type=heads

We should try to nail down a common storage interface we can use between projects. I believe it's a good idea to base it off the ES6 Set interface: https://gitlab.com/soapbox-pub/nset just with async types.

That nset is super cool. Will try to find time to look at the code later.

Duplicate entries is a problem for mine.

It would be cool to have an extension system that provides a storage interface and you can just plug and play. Almost getting into ORM territory tho.