Something that's been keeping me busy for the last 6 months...
I didn't know there were so many Elixir programmers, but apparently they're winning on Nostr. There are also https://github.com/Sgiath/nostr-private-relay and https://github.com/RiverFinancial/nostrex.
I think Elixir is pretty well suited for the design of a Nostr relay. I haven't put Nex through its paces yet, but in theory you should get good bang for your buck in terms of concurrent connections and cost of hardware.
The relay is called Nex. You can find it here:
https://github.com/lebrunel/nex
To my knowledge it's the second most feature complete relay out there. But I don't have much reach on Nostr yet so no-one knows its there. Any shares appreciated 🙏
Being elixir, should scale quite nicely, but not put through its paces yet.
DB-wise it uses Ecto so any sql database will fit. The package is set up for postgres but I've tested locally using sqlite and all passes nicely. Subscriptions go in an ETS table but thats probably where the biggest optimisations need to come.
Would require relays to all have the same events and agree on their order (like a blockchain).
I believe a bloom filter is more in line with what you’re envisaging.