-
Notifications
You must be signed in to change notification settings - Fork 712
NIP-200: Nostr Over HTTP(S) (NoH) #966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Yonle <yonle@lecturify.net>
Signed-off-by: Yonle <yonle@lecturify.net>
why would this be better than websockets? |
Above of that, Just to allow it being possible to communicate not only in Websocket. That's as far as i could tell. |
Signed-off-by: Yonle <yonle@lecturify.net>
Compression is supported on Websockets as well. The main difference is that each event is a separate package in WebSockets. The payloads are quite small. With HTTP, the entire filter is returned at once in a massive string. Both APIs might use the same filter spec, but the way to use this interface is not the same as the WebSockets one. |
|
The alleged benefits definitely do not justify breaking compatibility. |
Signed-off-by: Yonle <yonle@lecturify.net>
Signed-off-by: Yonle <yonle@lecturify.net>
Signed-off-by: Yonle <yonle@lecturify.net>
Signed-off-by: Yonle <yonle@lecturify.net>
|
Aside of having the alternative way for communicating with nostr relays, NoH do not rely on Doing a quick |
|
This specification can not be recognized EOSE. If there is a way to reduce transfer size using the HTTP-based method, it is chunked streams, I think. This is PoC. https://github.com/mattn/nostr-relay-http-chunk/ This HTTP server provide endless HTTP chunked stream. |
This is great. We could also put this as a feature for receiving events in real time. As it does not need EOSE, Disconnecting the HTTP server also equals closing the current subscription entirely. |
Signed-off-by: Yonle <yonle@lecturify.net>
Signed-off-by: Yonle <yonle@lecturify.net>
|
I think |
|
In my opinion, I also don't think it would be very useful to recreate all the relay behavior in HTTP. For example, unlike kind1, kind0 events are not changed or added frequently, so a model that acquires data in a stream is not suitable. In this case, WebSockets are difficult to cache, but if you proxy to HTTP, you can effectively use a CDN's edge cache etc. I was told recently that such an implementation already exists. It would be useful if it were standardized. However, since I am only talking about "read", I think it is appropriate to call it like |
This feature is entirely optional for a relay software to work.
As it was supposed to be also able to talk to nostr relay via HTTP, It's not rather just an proxy so i will leave the name as is. |
This NIP describes the basic of communicating to relays over HTTP(S) requests.
Potential use case:
Implementation:
[This doc still require some improvements]