Comments (11)
If there's nothing else I recommend closing the issue.
from rsocket-java.
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:
- Bi-directional flow control:
request-n
down andonNext
up. - Stream cancellation (unsubscription)
- Request Leasing.
- Stream multiplexing on the same connection.
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.
Running ReactiveSocket in such a degraded mode IMHO doesn't add value. What you are trying to achieve can very much be achieved via HTTP chunking (primarily the streamed responses) and you do not need ReactiveSocket.
from rsocket-java.
@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.
from rsocket-java.
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?
from rsocket-java.
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.
from rsocket-java.
Alright. I will be eager to hear others opinion around here but managing state across different connections IMO gets a bit ugly. YMMV
from rsocket-java.
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.
from rsocket-java.
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?
from rsocket-java.
Yes + the fact that if you use two connections, they may not reach the same server.
from rsocket-java.
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.
from rsocket-java.
Agree, closing the issue.
from rsocket-java.
Related Issues (20)
- Ability to store session object inside RSocketRequester chain HOT 1
- About JWT authentication and authorization HOT 1
- How to set SETUP setupRoute
- SendUtils onDiscard handler class cast exception HOT 5
- https://maven.pkg.github.com/rsocket/rsocket-java (needs permission to access) HOT 1
- Tcp Example Server and Client in Seperate files doesn't work HOT 5
- NoSuchFieldError: rsocket-core overrides dependency for netty-buffer and therefore clashes with reactor-bom / reactor-netty HOT 2
- ClosedChannelException making RSocket request with invalid credentials HOT 1
- Bump reactor-bom to 2020.0.24 to fix CVE in reactor-netty HOT 2
- 1.1.4 Regression - RejectedSetupException on auth failure results in ClosedChannelException HOT 3
- Releasing memory in ZERO_COPY mode.
- Ongoing flux subscription is not getting cancelled even if the client is closed
- LoadbalanceRSocketClient lacks reconnection and retry functions HOT 1
- Send a message to an already established request-stream connection from the rsocket-server to all signed rscoket-clients except one
- How to keep RSocket connection alive forever. What should be configuration values for keepalive(interval, maxLifeTime) to achieve this? HOT 1
- Update "Supported Core Protocol Features Matrix" to add that Resumption is supported
- Server does not close and re-connect on no keep alive ack issue.
- Rsocket error "java.lang.IllegalStateException: Source has to be ASYNC fuseable" with Spring boot 3.2.x & JDK17 HOT 2
- RSocketRequesterTracingObservationHandler producing netty buffer LEAKs
- throw exception on errorConsumer, client will not finish
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rsocket-java.