Developing nostr stuff on a 5G modem connection has been eye opening. Websockets are flakey as fuck and none of the current libraries can handle this.

Reply to this note

Please Login to reply.

Discussion

I have been wondering if using WebTransport could help with reliability.

Yeah it probably will, problem is lack of support on mobile browsers right now.

I used to laugh at people suggesting a long polling bridge for nostr, but wasting multiple days trying to make websockets work nicely makes this suddenly seem like a good idea.

Long polling could be an interesting solution for mobile. I would need to do a deepdive to see if upgrading to WebTransport would make sense when available. Although using QUIC for fast setup seems promising.

yeah gonna need multiple transports

How come web sockets don't work well on 5G?

interesting. any specific failures you're noticing?

Browser websocket connections either fail totally or stall quickly. Chrome + Firefox have the same issue.

Websockets without the browser (using golang) are OK though.

Are you telling me no websockets at all work anywhere? Can you run an echo server locally and try to connect manually to it with `new WebSocket()` in the browser?