This has always totally confused me. Why are they even called relays? They don't just relay. Some/most don't ever relay at all.

They are event stores (some of them are already quite large and have multiple years' worth of documents in them), and you can get information out of them with a request.

But they're decentralized (not fully distributed, but a hub-and-spoke network), so they're called "relays". Confusing, but trendy.

Reply to this note

Please Login to reply.

Discussion

because they relay events

Yes, but everyone who hears the word "relay" thinks the storage is a completely separate thing. That allows them to sell the idea of needing a "cache server", after all. A relay can also have a cache or a database. Relays also _store_.

they primarily store!

that's why i built the fastest possible store into realy

their cache server used sqlite for years

as a kv store

okay SQLite as SQL not a bad idea but

Their architecture strikes me as something dreamt up by the same marketing geniuses that brought us the "Bitcoin is scarce, so let's rename sats to Bitcoin and then everyone can pretend to have one," folks.

Relays sound like they don't have a cache and aren't a server, so let's give people a "cache server"!

it's quite comical how otherwise smart people are missing this when it's right there in nip-01

Because of the name. Relays relay. They pass things on.

That relays usually have a cache, to smooth the data transfer and allow for delayed relaying, is a step more abstract.

As someone whos built a cache server I'm triggered.

if the client has some of the logic then why wrap it all up in the server?

yeah, it's a publish/subscribe/post office protocol

the "relay" acts as a network accessible database as well as passing messages as a middleman

it is quite clever in this most fundamental aspect of its design, but it's so damn near close to the latest tech in databases

just an example of how leaps in technology often are just right next door to what exists

advances in architecture tend to have an exponential result in effect

The two use cases that emphasize the "relay" part of relays are:

- Ephemeral events

- Live subscriptions

In those cases, relays are actually a pretty good implementation of a distributed publish/subscribe messaging system.

yes, but even then, why websockets when SSE has been mature since 2016

if you are wondering the term you are looking for is NATS JetStream