-
Notifications
You must be signed in to change notification settings - Fork 594
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
Peer to Peer Extension to HTTP #3757
Comments
Sounds interesting, but as you suggest it should be use-case driven. |
As I understand the Akka gRPC uses HTTP/2 . The designers of that protocol may find P2P HTTP brings some valuable benefits to gRPC. It may be worth asking the right person there? (I don't know that ecosystem, so I would not know who to ask) |
@bblfish For p2p we may need some distributed adress table。 |
Mhh. I am using P2P in the sense of Peer to Peer, that is two way communication on a single connection. For that we don't need distributed address tables. The connection is already open. What is needed is the ability for the contacted server to turn around and become the client. That is what the P2P Extension to HTTP Request For Comments draft proposes. One use case I am interested in, to answer @jrudolph, is that it makes it possible for the client to pass URLs with relative links that point to the client-qua-server, using a new notation - say |
It would probably be possible with the current implementation because client and server already share the core components. I haven't thought a lot about this feature but it sounds to me like somewhat brittle to use connection-based addressing. To make that work you would have to build customized HTTP clients and server stacks (connection pools, load-balancers, etc), which would add complexity everywhere. Is it really necessary to build that on top of HTTP? If we need to change HTTP to make it work, it should have general applicability which is not clear to me it has. |
I just came across rsocket which also has this peer to peer feature: namely it is a connection oriented protocol where client and server roles can be switched. I am just watching this introductory session RSocket: Solving Real-World Architectural Challenges which gives the quick high level overview of how it works. The following slide addresses the peer aspect 6 min 20 seconds in: As it is a binary protocol that made me think of Quic (being discussed in issue 3692) and a speedy search found that they have an interesting answer on QUIC and rsockets in their FAQ:
So I don't yet know enough about rsocket, but it does show that this peer to peer feature is in demand. |
I don't know RSocket well enough to provide a good answer as to how it relates. As for QUIC, I think it would be substantially easier to define a bidirectional extension to QUIC because it already has the underlying stream representation requirements. Extending HTTP/3 is a little harder but absolutely not a challenge, and indeed a carefully crafted HTTP/3 implementation should be able to run multiple HTTP/3 "connections" within a single QUIC connection. |
About 5 years ago @Lukasa wrote up an IETF draft named Peer-to-peer Extension to HTTP/2 which allows an HTTP connection to switch between taking on the role of a client and a server.
I found it thinking about a use case of it for Credential Negotiation described HTTP-Signature authentication for Solid.
There may be quite a lot of other use cases for very large deployments of Akka, and for inter Actor communication. I don't know. Perhaps people can use this issue to suggest interesting use cases.
I wonder how difficult something like this would be to implement, assuming that one had concluded that there were really convincing use cases for it. Also it would be interesting to know if that maps nicely to QUIC.
The text was updated successfully, but these errors were encountered: