-
Notifications
You must be signed in to change notification settings - Fork 352
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
Netty/HTTP (Server) Implementation #70
Comments
My $0.02 ReactiveSocket is a stateful protocol built on top of a long-lived, full-duplex connection which provides a very "conversational" interaction. Few of the benefits of such an interaction are:
None of the above can be achieved via a stateless, uni-directional (post initial request) protocol such as HTTP/1.1. So, it is not so much about efficiency in this case but just lack of features when running ReactiveSocket over HTTP/1.1. |
@NiteshKant, it'd be nice to have the same API, regardless of transport. I believe all of those benefits can be had in HTTP/2. If things can be made to work with 1.1, even if less efficiently, why not? HTTP/1.1 does not have stream multiplexing, of course, but request(n) and cancellation can be made to work. |
request(n) and cancellation requires signal from the client post request send i.e. interleaved with response stream. How would that work with HTTP/1.1? |
In the case of HTTP/1.1, a second connection would be required to send the POST, since the original response will be long-running, and kept open. |
Alright. I will be eager to hear others opinion around here but managing state across different connections IMO gets a bit ugly. YMMV |
HTTP/1 is probably usable if you control the network topology (e.g. guarantee that there isn't any HTTP proxy). But HTTP/2 would definitely be a better fit. |
to @stevegury: I am assuming that you are talking about the case when there is a HTTP proxy, which doesn't understand SSE, buffers the traffic from server to client. Then the response stream from server to client will not flow. Is that what you meant? |
Yes + the fact that if you use two connections, they may not reach the same server. |
True. I think that complication about the connections not reaching the same back-end server on account of load-balancing is a deal-breaker for HTTP/1.1 in common cases. (I do have an example in mind where this wouldn't be a problem.) So agree, @NiteshKant. |
If there's nothing else I recommend closing the issue. |
Agree, closing the issue. |
I'm filing this since the reactivesocket-http-netty repository isn't present. I'm working on an HTTP (1.1 will do; 2 will be more efficient) implementation described below, wanted to get feedback on the approach.
The text was updated successfully, but these errors were encountered: