-

@ mleku
2025-02-21 08:46:50
see, that's the thing, why use websockets for request/response tho? that's an extra round trip, for a start
the majority of queries on relays is not subscriptions, which do need it
not only that, from a programming perspective, sockets require a thread to maintain their ping, at minimum, you can maybe optimise that in some way by having one thread handle many but it's not going to be much better than using coroutines for them (about 2kb per thread, it's event driven by timer interrupts)
whereas a standard http request/respones is a single thread for the lifetime of the query which is as long as it takes to pull the relevant data from the database, encode it and dispatch it