Has anyone built a REST style API interface for relays? Something for just querying so you don't have to manage the overhead of websockets?
Discussion
I haven't but im def interested to hear from people or follow this thread
Not that I know.
The idea is some kind of reverse proxy that receives http messages and pass it on to the relays?
More just a simpler interface over the same DB that the relay is running. Maybe even just read only.
brb.io exposes their relay content in a restful interface which is really nice. #[2] are the endpoints part of the relay or a separate layer over the db?
I would think they’d be a separate interface over the same db. It would open things up for more interesting explorer type use cases I think.
Would probably take a huge amount of load off of relays as well.
Agree with that, was curious if the brb team had any repos. But yeah aside from that specific instance I’m with you on using REST interfaces…. also think things like Rabbit or Kafka are good solutions for patterns like this.
Personal opinion is that nostr the protocol is the event model/schema, websockets are an interface. None of the filtering patterns defined in the nips are unique to that layer.