Global Feed Post Login
Replying to Avatar Five

Ppl have used http to fetch nostr events and I think there are some who still do.

Fiatjaf doesn't like it I know and this has been heavily debated back in the nostr telegram group days.

My guess is this: most apps most will end up keeping a connection alive to fetch multiple things from a relay as user navigates the app and even post things, with relatively high frequency.

Relays want to aim for simplicity mostly so they expose websocket connections to handle the common use-cases instead of having REST too. I think the EOSE is kind of the equivalent to an http response so that you can close the connection if you don't need anything else. Most libs/sdk-s have "closeOnEOSE" option therefore.

Avatar
Tim Bouma 11mo ago

Websockets is way better for listening, when new events come in. Connection is already created. With https you have to do long polling which is resource-intensive.

Reply to this note

Please Login to reply.

Discussion

No replies yet.